Hi,
On 2024-12-17 13:09:49 -0500, Tom Lane wrote:
> I wrote:
> > Andres Freund <andres@anarazel.de> writes:
> >> Was about to apply that, but then started to wonder if we don't need the same
> >> for configure? And it sure looks like that has the same problem?
> >> Which also confuses me some, at some point this presumably worked?
>
> > The configure path does work on NetBSD 10, and has for some time.
>
> Ah, sorry, I'd forgotten that bsd_auth.h only exists on OpenBSD.
> We correctly detect that the header is not there on NetBSD.
>
> I tried it on OpenBSD 7.0, which is the only OpenBSD image I have
> laying about at the moment, and configure correctly finds that the
> "AC_CHECK_HEADER(bsd_auth.h, [], ...)" test succeeds. So it looks
> to me like we should not need the sys/types.h include --- unless
> they broke it in some more-recent release?
It does look like it was recently broken:
https://www.postgresql.org/message-id/CAN55FZ0czTmfnfF%3DWOHJUZ0iZRiMz6Yf3FSMbPh4%3DZ5a_TDjKw%40mail.gmail.com
/usr/include/bsd_auth.h:93:1: error: unknown type name 'quad_t'
I'm pretty sure that it *did* work not too long ago with meson, because I had
tested the meson stuff on openbsd when I wrote it.
And as Peter noted:
> The synopsis in https://man.openbsd.org/authenticate.3 is:
>
> #include <sys/types.h>
> #include <login_cap.h>
> #include <bsd_auth.h>
Which does look a bit like they expect sys/types.h to be included first.
Looking at their git mirror, I do indeed not see anything that'd include
sys/types.h:
https://github.com/openbsd/src/blob/master/include/bsd_auth.h
first includes machine/_types.h, which I think maps to:
https://github.com/openbsd/src/blob/master/sys/arch/amd64/include/_types.h#L4
and then sys/cdefs.h:
https://github.com/openbsd/src/blob/master/sys/sys/cdefs.h
which I think in turn includes
https://github.com/openbsd/src/blob/master/sys/arch/amd64/include/cdefs.h
None of those define quad_t. But none seems to have changed in a relevant way
recently either.
I wonder if this is due to a newer compiler having different implicit includes
or something?
> (It looks like none of our OpenBSD BF animals are testing
> --with-bsd-auth, which is surely bad.)
Agreed.
Greetings,
Andres Freund