aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2025-02-12 08:15:54 -0500
committerAndres Freund <andres@anarazel.de>2025-02-12 08:15:54 -0500
commit01cdb98e446aadd10132574d7e9fa4470d17b45e (patch)
tree4684d380434030887f9e429fea7b1e19e3458dac
parentd29bf192e5498418c41d5fd6a8540b13920d0572 (diff)
downloadpostgresql-01cdb98e446aadd10132574d7e9fa4470d17b45e.tar.gz
postgresql-01cdb98e446aadd10132574d7e9fa4470d17b45e.zip
meson: Fix failure to detect bsd_auth.h presence
bsd_auth.h file needs to be included after 'sys/types.h', as documented in https://man.openbsd.org/authenticate.3 The reason a similar looking stanza works for autoconf is that autoconf automatically adds AC_INCLUDES_DEFAULT, which in turn includes sys/types.h. Backpatch to all versions with meson support. Author: Nazir Bilal Yavuz <byavuz81@gmail.com> Discussion: https://postgr.es/m/637haqqyhg2wlz7q6wq25m2qupe67g7f2uupngzui64zypy4x2@ysr2xnmynmu4 Backpatch-through: 16
-rw-r--r--meson.build3
1 files changed, 2 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index ae2bb95b9cc..16de8bfd598 100644
--- a/meson.build
+++ b/meson.build
@@ -553,7 +553,8 @@ test_c_args = cppflags + cflags
bsd_authopt = get_option('bsd_auth')
bsd_auth = not_found_dep
if cc.check_header('bsd_auth.h', required: bsd_authopt,
- args: test_c_args, include_directories: postgres_inc)
+ args: test_c_args, prefix: '#include <sys/types.h>',
+ include_directories: postgres_inc)
cdata.set('USE_BSD_AUTH', 1)
bsd_auth = declare_dependency()
endif