]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: define _GNU_SOURCE when checking for SO_PASSCRED
authorThomas Weißschuh <thomas@t-8ch.de>
Thu, 1 Feb 2024 19:48:49 +0000 (20:48 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Thu, 1 Feb 2024 19:48:49 +0000 (20:48 +0100)
SO_PASSCRED is not exposed in standards mode that was enabled in
commit 6240e4458cdf ("build: use -std=c99 and -std=c++11 by default").

Fixes: #2750
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
meson.build

index 4f85cee1548c5625d91d3a0ec77b5f92e572161c..7bd87e6fa2db3d73b0fb94f17a6c302e6a8c153f 100644 (file)
@@ -783,6 +783,7 @@ have_sock_nonblock = cc.has_header_symbol(
   required : build_plymouth_support.enabled())
 have_so_passcred = cc.has_header_symbol(
   'sys/socket.h', 'SO_PASSCRED',
+  args : ['-D_GNU_SOURCE'],
   prefix : '#include <sys/types.h>',
   required : build_plymouth_support.enabled())