[PATCH xserver 08/10] meson: Add missing setup of the NO_LOCAL_CLIENT_CRED define.

Eric Anholt eric at anholt.net
Tue Aug 7 23:23:17 UTC 2018


Ported from autotools.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 include/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/meson.build b/include/meson.build
index 13ca1f8f8d34..6d08b05733b8 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)
-- 
2.18.0



More information about the xorg-devel mailing list