[issue10141] SocketCan support

Charles-François Natali report at bugs.python.org
Fri Oct 7 18:03:56 CEST 2011


Charles-François Natali <neologix at free.fr> added the comment:

> which would imply that on this system at least, the AF_CAN definition is 
> supposed to come from elsewhere.

Yes, from <bits/socket.h>.
Looks like a crappy libc version: <linux/can.h> is present, but AF_CAN is not defined.
Just for fun, is PF_CAN defined?

You might try the following in configure.in:
"""
# On Linux, can.h and can/raw.h require sys/socket.h
AC_CHECK_HEADERS(linux/can.h linux/can/raw.h,,,[
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#ifndef AF_CAN
# error "AF_CAN not defined"
#endif
#endif
])
"""

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10141>
_______________________________________


More information about the Python-bugs-list mailing list