47 lines
1.8 KiB
Diff
47 lines
1.8 KiB
Diff
From de32428995ba0ee22386f10edd165afc4df7830f Mon Sep 17 00:00:00 2001
|
|
From: Naveen M K <naveen521kk@gmail.com>
|
|
Date: Wed, 21 Jun 2023 15:42:39 +0530
|
|
Subject: [PATCH 126/N] Include `winsock.h` when checking for netdb function
|
|
|
|
also move `gethostname` to that check
|
|
---
|
|
configure.ac | 11 +++++++++--
|
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index aa8d950..8e6bbfd 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -4879,7 +4879,7 @@ AC_CHECK_FUNCS([ \
|
|
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
|
|
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
|
|
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
|
|
- getgrnam_r getgrouplist getgroups gethostname getitimer getloadavg getlogin \
|
|
+ getgrnam_r getgrouplist getgroups getitimer getloadavg getlogin \
|
|
getpeername getpgid getpid getppid getpriority _getpty \
|
|
getpwent getpwnam_r getpwuid getpwuid_r getresgid getresuid getrusage getsid getspent \
|
|
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
|
|
@@ -5122,7 +5122,13 @@ PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [
|
|
])
|
|
|
|
dnl PY_CHECK_NETDB_FUNC(FUNCTION)
|
|
-AC_DEFUN([PY_CHECK_NETDB_FUNC], [PY_CHECK_FUNC([$1], [#include <netdb.h>])])
|
|
+AC_DEFUN([PY_CHECK_NETDB_FUNC], [PY_CHECK_FUNC([$1], [
|
|
+#ifdef _WIN32
|
|
+ #include <winsock.h>
|
|
+#else
|
|
+ #include <netdb.h>
|
|
+#endif
|
|
+])])
|
|
|
|
PY_CHECK_NETDB_FUNC([hstrerror])
|
|
dnl not available in WASI yet
|
|
@@ -5131,6 +5137,7 @@ PY_CHECK_NETDB_FUNC([getservbyport])
|
|
PY_CHECK_NETDB_FUNC([gethostbyname])
|
|
PY_CHECK_NETDB_FUNC([gethostbyaddr])
|
|
PY_CHECK_NETDB_FUNC([getprotobyname])
|
|
+PY_CHECK_NETDB_FUNC([gethostname])
|
|
|
|
dnl PY_CHECK_SOCKET_FUNC(FUNCTION)
|
|
AC_DEFUN([PY_CHECK_SOCKET_FUNC], [PY_CHECK_FUNC([$1], [
|