17065
|
1 |
--- Python-2.6.2/Modules/socketmodule.c.packet 2009-04-01 07:20:48.000000000 +1300
|
|
2 |
+++ Python-2.6.2/Modules/socketmodule.c 2009-12-01 21:25:04.133257645 +1300
|
|
3 |
@@ -81,6 +81,14 @@
|
|
4 |
|
|
5 |
*/
|
|
6 |
|
|
7 |
+#ifdef HAVE_NETPACKET_PACKET_H
|
|
8 |
+#ifdef sun
|
|
9 |
+#define USE_NETPACKET_PACKET_H 0
|
|
10 |
+#else
|
|
11 |
+#define USE_NETPACKET_PACKET_H 1
|
|
12 |
+#endif
|
|
13 |
+#endif
|
|
14 |
+
|
|
15 |
#ifdef __APPLE__
|
|
16 |
/*
|
|
17 |
* inet_aton is not available on OSX 10.3, yet we want to use a binary
|
|
18 |
@@ -1092,7 +1100,7 @@
|
|
19 |
}
|
|
20 |
#endif
|
|
21 |
|
|
22 |
-#ifdef HAVE_NETPACKET_PACKET_H
|
|
23 |
+#if USE_NETPACKET_PACKET_H
|
|
24 |
case AF_PACKET:
|
|
25 |
{
|
|
26 |
struct sockaddr_ll *a = (struct sockaddr_ll *)addr;
|
|
27 |
@@ -1382,7 +1390,7 @@
|
|
28 |
}
|
|
29 |
#endif
|
|
30 |
|
|
31 |
-#ifdef HAVE_NETPACKET_PACKET_H
|
|
32 |
+#if USE_NETPACKET_PACKET_H
|
|
33 |
case AF_PACKET:
|
|
34 |
{
|
|
35 |
struct sockaddr_ll* addr;
|
|
36 |
@@ -1559,7 +1567,7 @@
|
|
37 |
}
|
|
38 |
#endif
|
|
39 |
|
|
40 |
-#ifdef HAVE_NETPACKET_PACKET_H
|
|
41 |
+#if USE_NETPACKET_PACKET_H
|
|
42 |
case AF_PACKET:
|
|
43 |
{
|
|
44 |
*len_ret = sizeof (struct sockaddr_ll);
|
|
45 |
@@ -4575,7 +4583,7 @@
|
|
46 |
PyModule_AddStringConstant(m, "BDADDR_LOCAL", "00:00:00:FF:FF:FF");
|
|
47 |
#endif
|
|
48 |
|
|
49 |
-#ifdef HAVE_NETPACKET_PACKET_H
|
|
50 |
+#if USE_NETPACKET_PACKET_H
|
|
51 |
PyModule_AddIntConstant(m, "AF_PACKET", AF_PACKET);
|
|
52 |
PyModule_AddIntConstant(m, "PF_PACKET", PF_PACKET);
|
|
53 |
PyModule_AddIntConstant(m, "PACKET_HOST", PACKET_HOST);
|