summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2003-07-17 16:58:48 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2003-07-17 16:58:48 (GMT)
commitfb509a36c8194313cdc1e235bb2bb34399d10eac (patch)
tree30cd3d8718a6bc9c024ee6d001edda37aee2ef4b /Modules
parent7f7e1371ebf897942a18939e2262277e16c83637 (diff)
downloadcpython-fb509a36c8194313cdc1e235bb2bb34399d10eac.zip
cpython-fb509a36c8194313cdc1e235bb2bb34399d10eac.tar.gz
cpython-fb509a36c8194313cdc1e235bb2bb34399d10eac.tar.bz2
Get socketmodule compiling on IRIX 6.5.10.
I don't think the fix here is very good, but I'm not sure what would be better. In particular, we should not be defining _SGIAPI, but lots of things break if we remove it.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index c21d599..0884d9d 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -185,12 +185,21 @@ shutdown(how) -- shut down traffic in one or both directions\n\
# include <os2.h>
#endif
-#if defined(__sgi)&&_COMPILER_VERSION>700 && !_SGIAPI
+#if defined(__sgi) && _COMPILER_VERSION>700 && !_SGIAPI
/* make sure that the reentrant (gethostbyaddr_r etc)
functions are declared correctly if compiling with
MIPSPro 7.x in ANSI C mode (default) */
+
+/* XXX Using _SGIAPI is the wrong thing,
+ but I don't know what the right thing is. */
#define _SGIAPI 1
-#include "netdb.h"
+
+#ifndef ENABLE_IPV6
+#define INET_ADDRSTRLEN 16
+#endif
+
+#define HAVE_INET_PTON
+#include <netdb.h>
#endif
/* Generic includes */