summaryrefslogtreecommitdiff
path: root/gnulib-m4/sockpfaf.m4
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2024-10-20 15:21:58 +0200
committerJörg Frings-Fürst <debian@jff.email>2024-10-20 15:21:58 +0200
commit630f99f29bd31a76d8d24da2975a045452c763ef (patch)
tree0c801f68561bfb0930a4ade80d7ca3a7940887ab /gnulib-m4/sockpfaf.m4
parent84e26c587987e8484d55db4165f188b40c09e94b (diff)
parent4682deeb62247d34de87f8e777f99e2d337fd377 (diff)
Update upstream source from tag 'upstream/1.3'
Update to upstream version '1.3' with Debian dir 8a8e4828ddf646ece6c109b401e08d162be35936
Diffstat (limited to 'gnulib-m4/sockpfaf.m4')
-rw-r--r--gnulib-m4/sockpfaf.m413
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;]])],