xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jul 28 23:21:43 UTC 2024


 meson.build |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f3b43adf3acbd5ba1087f553a0d89354f85f6c5d
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Jul 27 11:59:34 2024 -0700

    meson: make AF_INET6 check work with stricter compiler flags
    
    Previously it failed with:
    _build/meson-private/tmpr7qpcbo1/testfile.c: In function 'main':
    _build/meson-private/tmpr7qpcbo1/testfile.c:7:5:
     error: old-style function definition [-Werror=old-style-definition]
        7 | int main() { int foo = AF_INET6; }
          |     ^~~~
    _build/meson-private/tmpr7qpcbo1/testfile.c:7:18:
     warning: unused variable 'foo' [-Wunused-variable]
        7 | int main() { int foo = AF_INET6; }
          |                  ^~~
    
    Fixes: bc55a98d6 ("meson: explicitly check whether AF_INET6 is available")
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1627>

diff --git a/meson.build b/meson.build
index 8810846a2..ada548a2d 100644
--- a/meson.build
+++ b/meson.build
@@ -291,7 +291,7 @@ have_AF_INET6 = cc.compiles('''
 #else
 #include <sys/socket.h>
 #endif
-int main() { int foo = AF_INET6; }''')
+int main(void) { int foo = AF_INET6; return foo; }''')
 if get_option('ipv6') == 'auto'
     build_ipv6 = cc.has_function('getaddrinfo') and have_AF_INET6
 else


More information about the xorg-commit mailing list