diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:22:21 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:22:21 +0200 |
commit | 1d8b9e17ea13630aec475484da09ebba0366f7c8 (patch) | |
tree | 0c801f68561bfb0930a4ade80d7ca3a7940887ab /gnulib-m4/sockpfaf.m4 | |
parent | 84e26c587987e8484d55db4165f188b40c09e94b (diff) | |
parent | 630f99f29bd31a76d8d24da2975a045452c763ef (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'gnulib-m4/sockpfaf.m4')
-rw-r--r-- | gnulib-m4/sockpfaf.m4 | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gnulib-m4/sockpfaf.m4 b/gnulib-m4/sockpfaf.m4 index 390abfe2..44ac7fd9 100644 --- a/gnulib-m4/sockpfaf.m4 +++ b/gnulib-m4/sockpfaf.m4 @@ -1,4 +1,5 @@ -# sockpfaf.m4 serial 10 +# sockpfaf.m4 +# serial 11 dnl Copyright (C) 2004, 2006, 2009-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -63,6 +64,13 @@ AC_DEFUN([gl_SOCKET_FAMILY_UNIX], AC_REQUIRE([gl_SYS_SOCKET_H]) AC_CHECK_HEADERS_ONCE([sys/un.h]) + dnl Windows versions released after 2017 may have support for AF_UNIX. + dnl Including it requires types from <winsock2.h> to be defined. + dnl <https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/>. + if test "$ac_cv_header_winsock2_h" = yes; then + AC_CHECK_HEADERS([afunix.h], [], [], [#include <winsock2.h>]) + fi + AC_CACHE_CHECK([for UNIX domain sockets], [gl_cv_socket_unix], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> @@ -74,6 +82,9 @@ AC_DEFUN([gl_SOCKET_FAMILY_UNIX], #endif #ifdef HAVE_WINSOCK2_H #include <winsock2.h> +#endif +#ifdef HAVE_AFUNIX_H +#include <afunix.h> #endif]], [[int x = AF_UNIX; struct sockaddr_un y; if (&x && &y) return 0;]])], |