Skip to content

Commit 452b0ce

Browse files
naveen521kklazka
authored andcommitted
Include winsock.h when checking for netdb function
also move `gethostname` to that check
1 parent 9769e0c commit 452b0ce

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

configure.ac

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4867,7 +4867,7 @@ AC_CHECK_FUNCS([ \
48674867
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
48684868
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
48694869
gai_strerror getegid getentropy geteuid getgid getgrgid getgrgid_r \
4870-
getgrnam_r getgrouplist getgroups gethostname getitimer getloadavg getlogin \
4870+
getgrnam_r getgrouplist getgroups getitimer getloadavg getlogin \
48714871
getpeername getpgid getpid getppid getpriority _getpty \
48724872
getpwent getpwnam_r getpwuid getpwuid_r getresgid getresuid getrusage getsid getspent \
48734873
getspnam getuid getwd if_nameindex initgroups kill killpg lchown linkat \
@@ -5110,7 +5110,13 @@ PKG_CHECK_MODULES([LIBLZMA], [liblzma], [have_liblzma=yes], [
51105110
])
51115111

51125112
dnl PY_CHECK_NETDB_FUNC(FUNCTION)
5113-
AC_DEFUN([PY_CHECK_NETDB_FUNC], [PY_CHECK_FUNC([$1], [#include <netdb.h>])])
5113+
AC_DEFUN([PY_CHECK_NETDB_FUNC], [PY_CHECK_FUNC([$1], [
5114+
#ifdef _WIN32
5115+
#include <winsock.h>
5116+
#else
5117+
#include <netdb.h>
5118+
#endif
5119+
])])
51145120

51155121
PY_CHECK_NETDB_FUNC([hstrerror])
51165122
dnl not available in WASI yet
@@ -5119,6 +5125,7 @@ PY_CHECK_NETDB_FUNC([getservbyport])
51195125
PY_CHECK_NETDB_FUNC([gethostbyname])
51205126
PY_CHECK_NETDB_FUNC([gethostbyaddr])
51215127
PY_CHECK_NETDB_FUNC([getprotobyname])
5128+
PY_CHECK_NETDB_FUNC([gethostname])
51225129

51235130
dnl PY_CHECK_SOCKET_FUNC(FUNCTION)
51245131
AC_DEFUN([PY_CHECK_SOCKET_FUNC], [PY_CHECK_FUNC([$1], [

0 commit comments

Comments
 (0)