Hi,

On Wed, 25 Jun 2025 at 13:45, Nazir Bilal Yavuz <byavu...@gmail.com> wrote:
>
> Hi,
>
> On Tue, 24 Jun 2025 at 23:46, Jacob Champion
> <jacob.champ...@enterprisedb.com> wrote:
> >
> > On Tue, Jun 24, 2025 at 1:27 AM Nazir Bilal Yavuz <byavu...@gmail.com> 
> > wrote:
> > > I think this is a good idea. Another point is that CI images and their
> > > packages are updated automatically, so it would be easier to catch if
> > > something breaks when the VM is updated.
> >
> > Yes, that's a great point too. Okay, sounds like there is some
> > interest, and I'll add it to my list of patchsets to try (but if
> > anyone wants to beat me to it, please go ahead!).
>
> I wanted to experiment with it. First, I got the current list of
> features from upstream, then disabled the auto features, then
> explicitly enabled these features. I did this only for FreeBSD to show
> my idea roughly.
>
> There are two patches; 0001 disables auto features for all of the
> tasks and 0002 explicitly enables these features for FreeBSD.

It seems CFBot is using these patches [1], resharing actual patch [2]
with the hopes that it will be used by CFBot.

[1] 
https://github.com/postgresql-cfbot/postgresql/commit/453329f784a7977099046f94ec45e9614c9ab279
[2] 
https://www.postgresql.org/message-id/CAOYmi%2BkdR218ke2zu74oTJvzYJcqV1MN5%3DmGAPqZQuc79HMSVA%40mail.gmail.com

-- 
Regards,
Nazir Bilal Yavuz
Microsoft
From f8dde8b1260a4b8d7a546af1ceed2a26c4bac35f Mon Sep 17 00:00:00 2001
From: Jacob Champion <jacob.champ...@enterprisedb.com>
Date: Fri, 13 Jun 2025 15:52:07 -0700
Subject: [PATCH] oauth: Fix kqueue detection on OpenBSD

In b0635bfda, I added an early header check to the Meson OAuth support,
which was intended to duplicate the later checks for
HAVE_SYS_[EVENT|EPOLL]_H. However, I implemented the new test via
check_header() -- which tries to compile -- rather than has_header(),
which just looks for the file's existence.

The distinction matters on OpenBSD, where <sys/event.h> can't be
compiled without including prerequisite headers, so -Dlibcurl=enabled
failed on that platform. Switch to has_header() to fix this.
---
 meson.build | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 06382b728e6..16a9c4708ed 100644
--- a/meson.build
+++ b/meson.build
@@ -943,10 +943,10 @@ if not libcurlopt.disabled()
   # libcurl and one of either epoll or kqueue.
   oauth_flow_supported = (
     libcurl.found()
-    and (cc.check_header('sys/event.h', required: false,
-                         args: test_c_args, include_directories: postgres_inc)
-         or cc.check_header('sys/epoll.h', required: false,
-                            args: test_c_args, include_directories: postgres_inc))
+    and (cc.has_header('sys/event.h',
+                       args: test_c_args, include_directories: postgres_inc)
+         or cc.has_header('sys/epoll.h',
+                          args: test_c_args, include_directories: postgres_inc))
   )
 
   if oauth_flow_supported
-- 
2.34.1

Reply via email to