From b0afb8fe0ff1d87165af9df61501197a06240dda Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Sun, 28 Dec 2025 12:13:40 +0100 Subject: Sync with Gnulib stable-202507 code (a8ac9f9ce5) --- gl/m4/sockpfaf.m4 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'gl/m4/sockpfaf.m4') diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4 index c68b3abb..08ce843d 100644 --- a/gl/m4/sockpfaf.m4 +++ b/gl/m4/sockpfaf.m4 @@ -1,9 +1,10 @@ # sockpfaf.m4 -# serial 10 -dnl Copyright (C) 2004, 2006, 2009-2024 Free Software Foundation, Inc. +# serial 11 +dnl Copyright (C) 2004, 2006, 2009-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. +dnl This file is offered as-is, without any warranty. dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...) dnl and some common address families (AF_INET, AF_INET6, ...). @@ -64,6 +65,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 to be defined. + dnl . + if test "$ac_cv_header_winsock2_h" = yes; then + AC_CHECK_HEADERS([afunix.h], [], [], [#include ]) + fi + AC_CACHE_CHECK([for UNIX domain sockets], [gl_cv_socket_unix], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include @@ -75,6 +83,9 @@ AC_DEFUN([gl_SOCKET_FAMILY_UNIX], #endif #ifdef HAVE_WINSOCK2_H #include +#endif +#ifdef HAVE_AFUNIX_H +#include #endif]], [[int x = AF_UNIX; struct sockaddr_un y; if (&x && &y) return 0;]])], -- cgit v1.2.3-74-g34f1