summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2011-05-15 19:18:23 (GMT)
committerGregory P. Smith <greg@krypto.org>2011-05-15 19:18:23 (GMT)
commit3b1f2c35f47b4ad87ddc998d91f2a041dd27bdb2 (patch)
tree411907a7a14084e210e84c1a7b565909f7ec89ea /Modules/socketmodule.c
parent4d58fdb1a6bbb404910e7964c763b67f46244bba (diff)
downloadcpython-3b1f2c35f47b4ad87ddc998d91f2a041dd27bdb2.zip
cpython-3b1f2c35f47b4ad87ddc998d91f2a041dd27bdb2.tar.gz
cpython-3b1f2c35f47b4ad87ddc998d91f2a041dd27bdb2.tar.bz2
issue #1746656: Fix for OS X. configure and #include changes so that the socket
module compiles again on OS X with its more annoying #include requirements.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 701af2f..d3f65aa 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -256,6 +256,14 @@ if_indextoname(index) -- returns the corresponding interface name\n\
#include <sys/types.h>
#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#ifdef HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+
/* Generic socket object definitions and includes */
#define PySocket_BUILDING_SOCKET
#include "socketmodule.h"