summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Champion2025-07-07 18:58:04 +0000
committerJacob Champion2025-07-07 18:58:04 +0000
commit3a797c24914af421cf9d4d09bc90024884841dfa (patch)
tree9509a4a60f550fb5b4571368ec2b29cf67b00c3c
parent440c5ee202000a30c4e7b27cd952edb2ab16cea8 (diff)
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. Note that reviewers expressed concern about the difference between our Autoconf feature tests (which compile headers) and our Meson feature tests (which do not). I'm not opposed to aligning the two, but I want to avoid making bigger changes as part of this fix. Reviewed-by: Peter Eisentraut <[email protected]> Reviewed-by: Tom Lane <[email protected]> Discussion: https://postgr.es/m/flat/CAOYmi+kdR218ke2zu74oTJvzYJcqV1MN5=mGAPqZQuc79HMSVA@mail.gmail.com Backpatch-through: 18
-rw-r--r--meson.build8
1 files changed, 4 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 6ffe7b47275..692b8b8de0b 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