Skip to content

Commit 0cf7cd7

Browse files
author
Patrick Menschel
committed
Add import for linux/can/isotp.h
IsoTp CAN protocol is available since Kernel v5.10 but several constants from isotp.h have not found their way into socket module. This commit adds that header file if configure finds it. Signed-off-by: Patrick Menschel <menschel.p@posteo.de>
1 parent a42d98e commit 0cf7cd7

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

Modules/socketmodule.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ typedef int socklen_t;
144144
#include <linux/can/bcm.h>
145145
#endif
146146

147+
#ifdef HAVE_LINUX_CAN_ISOTP_H
148+
#include <linux/can/isotp.h>
149+
#endif
150+
147151
#ifdef HAVE_LINUX_CAN_J1939_H
148152
#include <linux/can/j1939.h>
149153
#endif

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8406,7 +8406,7 @@ done
84068406

84078407

84088408
# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
8409-
for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h
8409+
for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h linux/can/isotp.h
84108410
do :
84118411
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
84128412
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2270,7 +2270,7 @@ AC_CHECK_HEADERS(linux/vm_sockets.h,,,[
22702270
])
22712271

22722272
# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h
2273-
AC_CHECK_HEADERS(linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h,,,[
2273+
AC_CHECK_HEADERS(linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h linux/can/isotp.h,,,[
22742274
#ifdef HAVE_SYS_SOCKET_H
22752275
#include <sys/socket.h>
22762276
#endif

0 commit comments

Comments
 (0)