mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
Issue #20065: socketmodule: Fix build error when AF_CAN is defined without the
proper CAN headers.
This commit is contained in:
parent
0400d33928
commit
b4062e8f8a
1 changed files with 3 additions and 3 deletions
|
@ -1226,7 +1226,7 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef AF_CAN
|
||||
#ifdef HAVE_LINUX_CAN_H
|
||||
case AF_CAN:
|
||||
{
|
||||
struct sockaddr_can *a = (struct sockaddr_can *)addr;
|
||||
|
@ -1654,7 +1654,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef AF_CAN
|
||||
#ifdef HAVE_LINUX_CAN_H
|
||||
case AF_CAN:
|
||||
switch (s->sock_proto) {
|
||||
case CAN_RAW:
|
||||
|
@ -1859,7 +1859,7 @@ getsockaddrlen(PySocketSockObject *s, socklen_t *len_ret)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef AF_CAN
|
||||
#ifdef HAVE_LINUX_CAN_H
|
||||
case AF_CAN:
|
||||
{
|
||||
*len_ret = sizeof (struct sockaddr_can);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue