Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ueeOv-00CrYK-AZ for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jul 2025 18:41:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ueeOr-003zYo-VR for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Jul 2025 18:41:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ueeOr-003zYg-MV for pgsql-bugs@lists.postgresql.org; Wed, 23 Jul 2025 18:41:09 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ueeOm-000Qhf-0X for pgsql-bugs@lists.postgresql.org; Wed, 23 Jul 2025 18:41:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 56NIf2gt1341740; Wed, 23 Jul 2025 14:41:02 -0400 From: Tom Lane To: Andrew Watkins cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message In-reply-to: References: <18995-82058da9ab4337a7@postgresql.org> <1313566.1753280855@sss.pgh.pa.us> Comments: In-reply-to Andrew Watkins message dated "Wed, 23 Jul 2025 16:31:10 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1341738.1753296062.1@sss.pgh.pa.us> Date: Wed, 23 Jul 2025 14:41:02 -0400 Message-ID: <1341739.1753296062@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Watkins writes: > You are right Solaris is missing "const" > struct pam_conv { > int (*conv)(int, struct pam_message **, struct pam_response **, > void *); > void *appdata_ptr; > }; So I tried to replicate this issue on an OpenIndiana VM (OI 2024.04), and got no failure. Digging into /usr/include/security/pam_appl.h, I found the reason: struct pam_conv { #ifdef _PAM_LEGACY_NONCONST int (*conv)(int, struct pam_message **, #else int (*conv)(int, const struct pam_message **, #endif struct pam_response **, void *); void *appdata_ptr; /* Application data ptr */ }; So that's just annoying as all get-out: it means some "Solaris" platforms do have this declaration with the "const", and even there it's going to be dependent on compilation environment. I still see a way to avoid a configure check though: let's make src/include/port/solaris.h "#define _PAM_LEGACY_NONCONST". That should make OpenIndiana enough like other Solaris-alikes for the purpose, and we can also use that same symbol to cue our code how to declare the callback function. Or we could create a configure check, but that seems like a lot of work, and it would add some extra time to everybody's build. regards, tom lane