Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 19151:cd44254360b6 legacy-trunk
Autotest for netpacket/packet.h, as it is not available on all Linux versions.
Depend AF_PACKET on HAVE_NETPACKET_PACKET_H. Fixes #449157
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Fri, 10 Aug 2001 20:29:40 +0000 |
| parents | 9fc4a5abb369 |
| children | 01a9b7807160 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Fri Aug 10 20:28:28 2001 +0000 +++ b/Modules/socketmodule.c Fri Aug 10 20:29:40 2001 +0000 @@ -179,7 +179,7 @@ #undef AF_UNIX #endif -#if defined(linux) && defined(AF_PACKET) +#ifdef HAVE_NETPACKET_PACKET_H #include <sys/ioctl.h> #include <net/if.h> #include <netpacket/packet.h> @@ -476,7 +476,7 @@ struct sockaddr_in6 in6; struct sockaddr_storage storage; #endif -#if defined(linux) && defined(AF_PACKET) +#ifdef HAVE_NETPACKET_PACKET_H struct sockaddr_ll ll; #endif } sock_addr; @@ -715,7 +715,7 @@ } #endif -#if defined(linux) && defined(AF_PACKET) +#ifdef HAVE_NETPACKET_PACKET_H case AF_PACKET: { struct sockaddr_ll *a = (struct sockaddr_ll *)addr; @@ -828,7 +828,7 @@ } #endif -#if defined(linux) && defined(AF_PACKET) +#ifdef HAVE_NETPACKET_PACKET_H case AF_PACKET: { struct sockaddr_ll* addr; @@ -901,7 +901,7 @@ } #endif -#if defined(linux) && defined(AF_PACKET) +#ifdef HAVE_NETPACKET_PACKET_H case AF_PACKET: { *len_ret = sizeof (struct sockaddr_ll); @@ -2983,7 +2983,7 @@ #ifdef AF_ROSE insint(d, "AF_ROSE", AF_ROSE); /* Amateur Radio X.25 PLP */ #endif -#if defined(linux) && defined(AF_PACKET) +#ifdef HAVE_NETPACKET_PACKET_H insint(d, "AF_PACKET", AF_PACKET); insint(d, "PF_PACKET", PF_PACKET); insint(d, "PACKET_HOST", PACKET_HOST);
