diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:21:43 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:21:43 +0200 |
commit | 4682deeb62247d34de87f8e777f99e2d337fd377 (patch) | |
tree | 5bd5b5605b5f3a4b3c8ea7468c34c23094afdef4 /gnulib-m4/sockpfaf.m4 | |
parent | 00893e79fc62966067af1a106567db96bd170338 (diff) |
New upstream version 1.3upstream/1.3upstream
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;]])], |