meson: Add missing setup of the NO_LOCAL_CLIENT_CRED define.

Ported from autotools.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Eric Anholt 2018-08-07 16:23:17 -07:00 committed by Adam Jackson
parent 049d2346ab
commit e047da37be

View File

@ -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)