]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix SF # 505427, socket module fails to build on HPUX10
authorNeal Norwitz <nnorwitz@gmail.com>
Thu, 14 Nov 2002 02:22:34 +0000 (02:22 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Thu, 14 Nov 2002 02:22:34 +0000 (02:22 +0000)
h_errno is not defined on HPUX with the 2.2 build env't
(ie, _XOPEN_SOURCE_EXTENDED is not defined)

Modules/socketmodule.c

index a7b5a5222af375440138e4f89ccdd50e7f97092b..1e31fb5ac2f6148bab72e26ee3c8dbea8f4a5165 100644 (file)
@@ -142,6 +142,11 @@ Socket methods:
 #include <netinet/tcp.h>
 #endif
 
+/* This declaration is required for HPUX 10 */
+#if defined(__hpux) && !defined(h_errno)
+extern int h_errno;
+#endif
+
 /* Headers needed for inet_ntoa() and inet_addr() */
 #ifdef __BEOS__
 #include <net/netdb.h>