pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Watkins <awatkins1966@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message
Date: Wed, 23 Jul 2025 14:41:02 -0400
Message-ID: <1341739.1753296062@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH5VfSHUdo1-OPtTn2rbr6LK9eYOtPpjh0=ctNiEMQmYL7BpPw@mail.gmail.com>
References: <18995-82058da9ab4337a7@postgresql.org>
	<1313566.1753280855@sss.pgh.pa.us>
	<CAH5VfSHUdo1-OPtTn2rbr6LK9eYOtPpjh0=ctNiEMQmYL7BpPw@mail.gmail.com>

Andrew Watkins <awatkins1966@gmail.com> 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





view thread (8+ messages)  latest in thread

Message-ID: <1341739.1753296062@sss.pgh.pa.us>
Permalink:  ../1341739.1753296062@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1341739.1753296062@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, awatkins1966@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18995: Building with GCC 14 fails: incompatible pointer struct pam_message
  In-Reply-To: <1341739.1753296062@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox