From df137f3ffd14c09163980707356593811d085a93 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 29 Sep 2026 05:56:27 +0000 Subject: [PATCH] canvenient: include for struct timeval on musl 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 --- .../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 diff --git a/meta-oe/recipes-devtools/canvenient/canvenient_1.02.bb b/meta-oe/recipes-devtools/canvenient/canvenient_1.02.bb index ea5634ec07..ec4a568f01 100644 --- a/meta-oe/recipes-devtools/canvenient/canvenient_1.02.bb +++ b/meta-oe/recipes-devtools/canvenient/canvenient_1.02.bb @@ -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" diff --git a/meta-oe/recipes-devtools/canvenient/files/0001-CANvenient_SocketCAN-include-sys-time.h-for-struct-.patch b/meta-oe/recipes-devtools/canvenient/files/0001-CANvenient_SocketCAN-include-sys-time.h-for-struct-.patch new file mode 100644 index 0000000000..86369edb6c --- /dev/null +++ b/meta-oe/recipes-devtools/canvenient/files/0001-CANvenient_SocketCAN-include-sys-time.h-for-struct-.patch @@ -0,0 +1,30 @@ +From: Khem Raj +Date: Tue, 29 Sep 2026 01:54:51 +0000 +Subject: [PATCH] CANvenient_SocketCAN: include sys/time.h for struct timeval + +On glibc, / transitively pull in a full +definition of struct timeval via . musl's headers do not +provide this transitive include, so struct timeval is only forward +declared (via ) and the file fails to build with +"variable has incomplete type 'struct timeval'". Include + explicitly so the type is fully defined regardless of +libc. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + 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 + #include + #include ++#include + #include + #include + #endif