@@ -17,7 +17,9 @@ DEPENDS = "libsocketcan"
PV .= "+git"
-SRC_URI = "git://github.com/CANopenTerm/CANvenient.git;protocol=https;branch=main"
+SRC_URI = "git://github.com/CANopenTerm/CANvenient.git;protocol=https;branch=main \
+ file://0001-CANvenient_SocketCAN-include-sys-time.h-for-struct-.patch \
+ "
SRCREV = "23408935f230f59632eafd56056824f8e91cd896"
new file mode 100644
@@ -0,0 +1,30 @@
+From: Khem Raj <khem.raj@oss.qualcomm.com>
+Date: Tue, 29 Sep 2026 01:54:51 +0000
+Subject: [PATCH] CANvenient_SocketCAN: include sys/time.h for struct timeval
+
+On glibc, <linux/can.h>/<sys/socket.h> transitively pull in a full
+definition of struct timeval via <sys/time.h>. musl's headers do not
+provide this transitive include, so struct timeval is only forward
+declared (via <sys/types.h>) and the file fails to build with
+"variable has incomplete type 'struct timeval'". Include
+<sys/time.h> explicitly so the type is fully defined regardless of
+libc.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
+---
+ src/drivers/CANvenient_SocketCAN.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/drivers/CANvenient_SocketCAN.c b/src/drivers/CANvenient_SocketCAN.c
+index 1111111..2222222 100644
+--- a/src/drivers/CANvenient_SocketCAN.c
++++ b/src/drivers/CANvenient_SocketCAN.c
+@@ -24,6 +24,7 @@
+ #include <linux/can.h>
+ #include <linux/can/raw.h>
+ #include <libsocketcan.h>
++#include <sys/time.h>
+ #include <time.h>
+ #include <unistd.h>
+ #endif
canvenient_socketcan.c uses struct timeval without pulling in a header that declares it; glibc gets it transitively, musl doesn't. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- .../canvenient/canvenient_1.02.bb | 4 ++- ...etCAN-include-sys-time.h-for-struct-.patch | 30 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-devtools/canvenient/files/0001-CANvenient_SocketCAN-include-sys-time.h-for-struct-.patch