diff options
author | Simon Ser <contact@emersion.fr> | 2023-02-18 11:29:25 +0100 |
---|---|---|
committer | Olivier Fourdan <fourdan@gmail.com> | 2023-04-14 14:59:05 +0000 |
commit | 636c9aa359eab45102c12a9fccb8f60587c7d485 (patch) | |
tree | 28f8c4ee4c8a78611c3ec1cd1540db2257bfc54f | |
parent | 8f7279ade26961ae790a3345ce11a239c842c773 (diff) | |
download | xserver-636c9aa359eab45102c12a9fccb8f60587c7d485.tar.gz |
build: set _GNU_SOURCE when checking for SO_PEERCRED
SO_PEERCRED is not POSIX, so might be hidden unless _GNU_SOURCE
is defined.
See [1]: cc.has_header_symbol() does not inherit the project
arguments.
[1]: https://github.com/mesonbuild/meson/issues/3301
Signed-off-by: Simon Ser <contact@emersion.fr>
-rw-r--r-- | include/meson.build | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/meson.build b/include/meson.build index a65bd35b5..fb8568489 100644 --- a/include/meson.build +++ b/include/meson.build @@ -192,7 +192,7 @@ if cc.has_header_symbol('sys/socket.h', 'SCM_RIGHTS') endif if conf_data.get('HAVE_GETPEEREID').to_int() == 0 and conf_data.get('HAVE_GETPEERUCRED').to_int() == 0 - if not cc.has_header_symbol('sys/socket.h', 'SO_PEERCRED') + if not cc.has_header_symbol('sys/socket.h', 'SO_PEERCRED', args: '-D_GNU_SOURCE') conf_data.set('NO_LOCAL_CLIENT_CRED', 1) endif endif |