mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-13 08:01:23 +00:00
meson: explicitly check whether AF_INET6 is available
We're currently not checking whether IPv6 is available before build,
so it just gets silently disabled if AF_INET6 is missing - even
when user wants to enable it explicitly. Adding explicit check into
meson.build, so failing when ipv6 option enabled, but no IPv6 supported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1539>
(cherry picked from commit bc55a98d62)
This commit is contained in:
committed by
Alan Coopersmith
parent
eede6c93c6
commit
2b69d1edfa
14
meson.build
14
meson.build
@@ -281,11 +281,23 @@ if build_xquartz
|
||||
build_rootless = true
|
||||
endif
|
||||
|
||||
# IPv6 support
|
||||
have_AF_INET6 = cc.compiles('''
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
int main() { int foo = AF_INET6; }''')
|
||||
if get_option('ipv6') == 'auto'
|
||||
build_ipv6 = cc.has_function('getaddrinfo')
|
||||
build_ipv6 = cc.has_function('getaddrinfo') and have_AF_INET6
|
||||
else
|
||||
build_ipv6 = get_option('ipv6') == 'true'
|
||||
endif
|
||||
if build_ipv6 and not have_AF_INET6
|
||||
error('ipv6 support needs AF_INET6')
|
||||
endif
|
||||
message('IPv6 support: ' + (build_ipv6 ? 'YES' : 'NO'))
|
||||
|
||||
int10 = get_option('int10')
|
||||
if int10 == 'auto'
|
||||
|
||||
Reference in New Issue
Block a user