From e047da37becc23a8d2549d8f264aaa18e4965186 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 7 Aug 2018 16:23:17 -0700 Subject: [PATCH] meson: Add missing setup of the NO_LOCAL_CLIENT_CRED define. Ported from autotools. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer --- include/meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/meson.build b/include/meson.build index 13ca1f8f8..6d08b0573 100644 --- a/include/meson.build +++ b/include/meson.build @@ -45,7 +45,6 @@ if cc.sizeof('unsigned long') == 8 endif conf_data.set('_GNU_SOURCE', '1') -# XXX: NO_LOCAL_CLIENT_CRED # autoconf checks for /dev/xf86 here, but the test should be based on # the target, not the build system. Could we get rid of this and just @@ -173,6 +172,12 @@ if cc.has_header_symbol('sys/socket.h', 'SCM_RIGHTS') conf_data.set('XTRANS_SEND_FDS', '1') endif +if not conf_data.get('HAVE_GETPEEREID') and not conf_data.get('HAVE_GETPEERUCRED') + if not cc.has_header_symbol('sys/socket.h', 'SO_PEERCRED') + conf_data.set('NO_LOCAL_CLIENT_CRED', 1) + endif +endif + conf_data.set('TCPCONN', '1') conf_data.set('UNIXCONN', '1') conf_data.set('IPv6', build_ipv6)