summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2014-03-20 12:42:42 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2014-03-20 12:42:42 (GMT)
commitecfc98c67b2571f0d212eb91efb556181c12dc92 (patch)
treea7a48395cd6a34a33ff243cb25a05a2ef87e7007 /Modules/socketmodule.c
parent373f0a925bcaed53e7e2eb0406694acb00a03e36 (diff)
downloadcpython-ecfc98c67b2571f0d212eb91efb556181c12dc92.zip
cpython-ecfc98c67b2571f0d212eb91efb556181c12dc92.tar.gz
cpython-ecfc98c67b2571f0d212eb91efb556181c12dc92.tar.bz2
Issue #10141: updated new usages of AF_CAN to be in #ifdef AF_CAN rather than #ifdef HAVE_LINUX_CAN_H to allow compilation on older Linuxes.
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 a1e5da8..7add6b6 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1165,7 +1165,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;
@@ -1589,7 +1589,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:
@@ -1796,7 +1796,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);