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.

This commit is contained in:
Vinay Sajip 2014-03-20 12:42:42 +00:00
parent 373f0a925b
commit ecfc98c67b
1 changed files with 3 additions and 3 deletions

View File

@ -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);