summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-08-29 09:05:51 -0700
committerKhem Raj <raj.khem@gmail.com>2019-08-29 12:23:12 -0700
commit33608095e403cb6290ee3a100a1208e6c9faf9d0 (patch)
tree36164a93d8707f95c9aacf8a785b2774bd95e04c /meta-oe/recipes-extended
parentd8685320a4dd7bb4f125494dd1fd65ba648b5c21 (diff)
downloadmeta-openembedded-33608095e403cb6290ee3a100a1208e6c9faf9d0.tar.gz
can-utils: Fix build with kernel headers >= 5.2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r--meta-oe/recipes-extended/socketcan/can-utils/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch106
-rw-r--r--meta-oe/recipes-extended/socketcan/can-utils_git.bb4
2 files changed, 109 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/socketcan/can-utils/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch b/meta-oe/recipes-extended/socketcan/can-utils/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch
new file mode 100644
index 000000000..cbf3aee10
--- /dev/null
+++ b/meta-oe/recipes-extended/socketcan/can-utils/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch
@@ -0,0 +1,106 @@
1From 20981c8a328747f823b7eef68d0c2812b3eaed30 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Sun, 14 Jul 2019 21:50:43 +0200
4Subject: [PATCH] fix include to find SIOCGSTAMP with latest kernel
5
6In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115
7the asm-generic/sockios.h header no longer defines SIOCGSTAMP.
8Instead it provides only SIOCGSTAMP_OLD.
9
10The linux/sockios.h header now defines SIOCGSTAMP using either
11SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only
12header file is not pulled so we get a build failure.
13
14canlogserver.c: In function 'main':
15canlogserver.c:404:21: error: 'SIOCGSTAMP' undeclared (first use in this function); did you mean 'SIOCGRARP'?
16 if (ioctl(s[i], SIOCGSTAMP, &tv) < 0)
17 ^~~~~~~~~~
18 SIOCGRARP
19canlogserver.c:404:21: note: each undeclared identifier is reported only once for each function it appears in
20
21Fixes:
22 - http://autobuild.buildroot.org/results/363de7d9bf433be8bc47ba4ee52ae0bb80fa9021
23
24Upstream-Status: Backport [https://github.com/linux-can/can-utils/commit/e9590b1ca75d360eaf3211bebd86058214d48064]
25Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
26---
27 canlogserver.c | 1 +
28 cansniffer.c | 1 +
29 isotpdump.c | 1 +
30 isotpperf.c | 1 +
31 isotpsniffer.c | 1 +
32 slcanpty.c | 1 +
33 6 files changed, 6 insertions(+)
34
35diff --git a/canlogserver.c b/canlogserver.c
36index e3350b7..f53165c 100644
37--- a/canlogserver.c
38+++ b/canlogserver.c
39@@ -61,6 +61,7 @@
40
41 #include <linux/can.h>
42 #include <linux/can/raw.h>
43+#include <linux/sockios.h>
44 #include <signal.h>
45 #include <errno.h>
46
47diff --git a/cansniffer.c b/cansniffer.c
48index 7b0a3fa..bf7d72e 100644
49--- a/cansniffer.c
50+++ b/cansniffer.c
51@@ -61,6 +61,7 @@
52
53 #include <linux/can.h>
54 #include <linux/can/bcm.h>
55+#include <linux/sockios.h>
56
57 #include "terminal.h"
58
59diff --git a/isotpdump.c b/isotpdump.c
60index b2b650a..36d8af3 100644
61--- a/isotpdump.c
62+++ b/isotpdump.c
63@@ -55,6 +55,7 @@
64
65 #include <linux/can.h>
66 #include <linux/can/raw.h>
67+#include <linux/sockios.h>
68 #include "terminal.h"
69
70 #define NO_CAN_ID 0xFFFFFFFFU
71diff --git a/isotpperf.c b/isotpperf.c
72index db3a2b7..5852a57 100644
73--- a/isotpperf.c
74+++ b/isotpperf.c
75@@ -56,6 +56,7 @@
76
77 #include <linux/can.h>
78 #include <linux/can/raw.h>
79+#include <linux/sockios.h>
80
81 #define NO_CAN_ID 0xFFFFFFFFU
82 #define PERCENTRES 2 /* resolution in percent for bargraph */
83diff --git a/isotpsniffer.c b/isotpsniffer.c
84index f42e18b..d7a4c66 100644
85--- a/isotpsniffer.c
86+++ b/isotpsniffer.c
87@@ -55,6 +55,7 @@
88
89 #include <linux/can.h>
90 #include <linux/can/isotp.h>
91+#include <linux/sockios.h>
92 #include "terminal.h"
93
94 #define NO_CAN_ID 0xFFFFFFFFU
95diff --git a/slcanpty.c b/slcanpty.c
96index 431ca68..7dfaf5c 100644
97--- a/slcanpty.c
98+++ b/slcanpty.c
99@@ -40,6 +40,7 @@
100
101 #include <linux/can.h>
102 #include <linux/can/raw.h>
103+#include <linux/sockios.h>
104
105 /* maximum rx buffer len: extended CAN frame with timestamp */
106 #define SLC_MTU (sizeof("T1111222281122334455667788EA5F\r")+1)
diff --git a/meta-oe/recipes-extended/socketcan/can-utils_git.bb b/meta-oe/recipes-extended/socketcan/can-utils_git.bb
index a2d62c366..db5055fed 100644
--- a/meta-oe/recipes-extended/socketcan/can-utils_git.bb
+++ b/meta-oe/recipes-extended/socketcan/can-utils_git.bb
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://include/linux/can.h;endline=43;md5=390a2c9a3c5e3595a0
5 5
6DEPENDS = "libsocketcan" 6DEPENDS = "libsocketcan"
7 7
8SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=git;branch=master" 8SRC_URI = "git://github.com/linux-can/${BPN}.git;protocol=git;branch=master \
9 file://0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch \
10 "
9SRCREV = "4c8fb05cb4d6ddcd67299008db54af423f86fd05" 11SRCREV = "4c8fb05cb4d6ddcd67299008db54af423f86fd05"
10 12
11PV = "0.0+gitr${SRCPV}" 13PV = "0.0+gitr${SRCPV}"