Re: [PATCH] Fix OAuth feature detection on OpenBSD+Meson

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Fix OAuth feature detection on OpenBSD+Meson
Date: 2025-06-24 20:29:22
Message-ID: 59b9c7c7-4263-4fb1-b758-14253133f16b@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 24.06.25 01:36, Jacob Champion wrote:
> I noticed that the OpenBSD build in CI wasn't running the libcurl
> tests. Turns out the feature test I added in b0635bfda is subtly
> broken, because it uses cc.check_header() rather than cc.has_header().
> On OpenBSD, apparently, the <sys/event.h> header can't be compiled
> without including additional prerequisite headers.
>
> The attached patch fixes that by just switching to has_header(). (I
> could add the prerequisites to the test instead, but I'd prefer to
> exactly match the logic we use to determine the value of the
> HAVE_SYS_EVENT_H macro. I don't think I had a good reason not to in
> the first place.)

Note that Autoconf uses a compilation test, not a preprocessor test, for
its AC_CHECK_HEADERS, so it uses .check_header() semantics. And this
was the result of a long transition, because the compile test was
ultimately deemed to be better. So in general, I would be wary about
moving away from .check_header() toward .has_header(). But it looks
like meson.build mixes those without much of a pattern, so maybe it
doesn't matter for now.

But I'm also suspicious, because by this explanation, the
AC_CHECK_HEADERS calls on sys/event.h should fail on OpenBSD, but they
do not on the existing buildfarm members.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-06-24 20:32:25 Re: pgsql: Introduce pg_shmem_allocations_numa view
Previous Message Robert Haas 2025-06-24 20:07:31 Re: pg_dump --with-* options