summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2011-10-07 20:47:08 (GMT)
committerCharles-François Natali <neologix@free.fr>2011-10-07 20:47:08 (GMT)
commit30589c9041c906ad63a2c286038f8ef1e2f33fc0 (patch)
treeaf70912b226e94105fb9d9e58e0267c85a4c9b1b /Modules/socketmodule.c
parent146177503c17c1c2b40a655a9af2b87e4746364c (diff)
downloadcpython-30589c9041c906ad63a2c286038f8ef1e2f33fc0.zip
cpython-30589c9041c906ad63a2c286038f8ef1e2f33fc0.tar.gz
cpython-30589c9041c906ad63a2c286038f8ef1e2f33fc0.tar.bz2
Issue #10141: fix socketmodule compilation on Linux systems with <linux/can.h>
but without AF_CAN definition.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index aac1b72..e64c960 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1220,7 +1220,7 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto)
}
#endif
-#ifdef HAVE_LINUX_CAN_H
+#ifdef AF_CAN
case AF_CAN:
{
struct sockaddr_can *a = (struct sockaddr_can *)addr;
@@ -1606,7 +1606,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
}
#endif
-#ifdef HAVE_LINUX_CAN_H
+#ifdef AF_CAN
case AF_CAN:
switch (s->sock_proto) {
case CAN_RAW:
@@ -1746,7 +1746,7 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
}
#endif
-#ifdef HAVE_LINUX_CAN_H
+#ifdef AF_CAN
case AF_CAN:
{
*len_ret = sizeof (struct sockaddr_can);