Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d74b593

Browse files
committed
Fix _socket compilation failures on non-Linux buildbots (cf. issue #1746656).
1 parent aedb282 commit d74b593

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

Modules/socketmodule.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,12 @@ typedef int socklen_t;
5959
#include <bluetooth.h>
6060
#endif
6161

62+
#ifdef HAVE_NET_IF_H
63+
# include <net/if.h>
64+
#endif
65+
6266
#ifdef HAVE_NETPACKET_PACKET_H
6367
# include <sys/ioctl.h>
64-
# include <net/if.h>
6568
# include <netpacket/packet.h>
6669
#endif
6770

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6037,7 +6037,7 @@ sys/lock.h sys/mkdev.h sys/modem.h \
60376037
sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
60386038
sys/stat.h sys/termio.h sys/time.h \
60396039
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6040-
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
6040+
libutil.h sys/resource.h net/if.h netpacket/packet.h sysexits.h bluetooth.h \
60416041
bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
60426042
do :
60436043
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ sys/lock.h sys/mkdev.h sys/modem.h \
12931293
sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
12941294
sys/stat.h sys/termio.h sys/time.h \
12951295
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
1296-
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
1296+
libutil.h sys/resource.h net/if.h netpacket/packet.h sysexits.h bluetooth.h \
12971297
bluetooth/bluetooth.h linux/tipc.h spawn.h util.h)
12981298
AC_HEADER_DIRENT
12991299
AC_HEADER_MAJOR

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,9 @@
539539
/* Define to 1 if you have the <netpacket/packet.h> header file. */
540540
#undef HAVE_NETPACKET_PACKET_H
541541

542+
/* Define to 1 if you have the <net/if.h> header file. */
543+
#undef HAVE_NET_IF_H
544+
542545
/* Define to 1 if you have the `nice' function. */
543546
#undef HAVE_NICE
544547

0 commit comments

Comments
 (0)