[Python-checkins] cpython: Fix _socket compilation failures on non-Linux buildbots (cf. issue #1746656).

nadeem.vawda python-checkins at python.org
Sun May 15 13:28:06 CEST 2011


http://hg.python.org/cpython/rev/434dfe42fde1
changeset:   70142:434dfe42fde1
parent:      70139:1aa48391da30
user:        Nadeem Vawda <nadeem.vawda at gmail.com>
date:        Sun May 15 13:16:22 2011 +0200
summary:
  Fix _socket compilation failures on non-Linux buildbots (cf. issue #1746656).

files:
  Modules/socketmodule.h |  5 ++++-
  configure              |  2 +-
  configure.in           |  2 +-
  pyconfig.h.in          |  3 +++
  4 files changed, 9 insertions(+), 3 deletions(-)


diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -59,9 +59,12 @@
 #include <bluetooth.h>
 #endif
 
+#ifdef HAVE_NET_IF_H
+# include <net/if.h>
+#endif
+
 #ifdef HAVE_NETPACKET_PACKET_H
 # include <sys/ioctl.h>
-# include <net/if.h>
 # include <netpacket/packet.h>
 #endif
 
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -6037,7 +6037,7 @@
 sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
 sys/stat.h sys/termio.h sys/time.h \
 sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
-libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
+libutil.h sys/resource.h net/if.h netpacket/packet.h sysexits.h bluetooth.h \
 bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -1293,7 +1293,7 @@
 sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
 sys/stat.h sys/termio.h sys/time.h \
 sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
-libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
+libutil.h sys/resource.h net/if.h netpacket/packet.h sysexits.h bluetooth.h \
 bluetooth/bluetooth.h linux/tipc.h spawn.h util.h)
 AC_HEADER_DIRENT
 AC_HEADER_MAJOR
diff --git a/pyconfig.h.in b/pyconfig.h.in
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -539,6 +539,9 @@
 /* Define to 1 if you have the <netpacket/packet.h> header file. */
 #undef HAVE_NETPACKET_PACKET_H
 
+/* Define to 1 if you have the <net/if.h> header file. */
+#undef HAVE_NET_IF_H
+
 /* Define to 1 if you have the `nice' function. */
 #undef HAVE_NICE
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list