From 50387d5e92518563eb02d7527c75bf68e18c23f5618b5b2a758fca0045aeaf42 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 26 Aug 2019 08:50:06 +0000 Subject: [PATCH] - Add 0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch to unbreak build with modern linux-glibc-devel. OBS-URL: https://build.opensuse.org/package/show/network/canutils?expand=0&rev=14 --- ...o-find-SIOCGSTAMP-with-latest-kernel.patch | 108 ++++++++++++++++++ canutils.changes | 6 + canutils.spec | 9 +- ...tils-2018.02.0.tar.gz => v2018.02.0.tar.gz | 0 4 files changed, 118 insertions(+), 5 deletions(-) create mode 100644 0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch rename can-utils-2018.02.0.tar.gz => v2018.02.0.tar.gz (100%) diff --git a/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch b/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch new file mode 100644 index 0000000..715f3da --- /dev/null +++ b/0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch @@ -0,0 +1,108 @@ +From e9590b1ca75d360eaf3211bebd86058214d48064 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sun, 14 Jul 2019 21:50:43 +0200 +Subject: [PATCH] fix include to find SIOCGSTAMP with latest kernel + +In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115 +the asm-generic/sockios.h header no longer defines SIOCGSTAMP. +Instead it provides only SIOCGSTAMP_OLD. + +The linux/sockios.h header now defines SIOCGSTAMP using either +SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only +header file is not pulled so we get a build failure. + +canlogserver.c: In function 'main': +canlogserver.c:404:21: error: 'SIOCGSTAMP' undeclared (first use in this function); did you mean 'SIOCGRARP'? + if (ioctl(s[i], SIOCGSTAMP, &tv) < 0) + ^~~~~~~~~~ + SIOCGRARP +canlogserver.c:404:21: note: each undeclared identifier is reported only once for each function it appears in + +Fixes: + - http://autobuild.buildroot.org/results/363de7d9bf433be8bc47ba4ee52ae0bb80fa9021 + +Signed-off-by: Fabrice Fontaine +--- + canlogserver.c | 1 + + cansniffer.c | 1 + + isotpdump.c | 1 + + isotpperf.c | 1 + + isotpsniffer.c | 1 + + slcanpty.c | 1 + + 6 files changed, 6 insertions(+) + +diff --git a/canlogserver.c b/canlogserver.c +index f9ae159..4429ccd 100644 +--- a/canlogserver.c ++++ b/canlogserver.c +@@ -62,6 +62,7 @@ + + #include + #include ++#include + #include + #include + +diff --git a/cansniffer.c b/cansniffer.c +index b710058..0ff29b4 100644 +--- a/cansniffer.c ++++ b/cansniffer.c +@@ -62,6 +62,7 @@ + + #include + #include ++#include + + #include "terminal.h" + +diff --git a/isotpdump.c b/isotpdump.c +index 1ab9416..97baeca 100644 +--- a/isotpdump.c ++++ b/isotpdump.c +@@ -57,6 +57,7 @@ + + #include + #include ++#include + #include "terminal.h" + + #define NO_CAN_ID 0xFFFFFFFFU +diff --git a/isotpperf.c b/isotpperf.c +index 6ee6ede..5ad302a 100644 +--- a/isotpperf.c ++++ b/isotpperf.c +@@ -57,6 +57,7 @@ + + #include + #include ++#include + + #define NO_CAN_ID 0xFFFFFFFFU + #define PERCENTRES 2 /* resolution in percent for bargraph */ +diff --git a/isotpsniffer.c b/isotpsniffer.c +index 6c19c8b..5d61872 100644 +--- a/isotpsniffer.c ++++ b/isotpsniffer.c +@@ -56,6 +56,7 @@ + + #include + #include ++#include + #include "terminal.h" + + #define NO_CAN_ID 0xFFFFFFFFU +diff --git a/slcanpty.c b/slcanpty.c +index e90b32a..5fdfa55 100644 +--- a/slcanpty.c ++++ b/slcanpty.c +@@ -37,6 +37,7 @@ + + #include + #include ++#include + + /* maximum rx buffer len: extended CAN frame with timestamp */ + #define SLC_MTU (sizeof("T1111222281122334455667788EA5F\r")+1) +-- +2.22.1 + diff --git a/canutils.changes b/canutils.changes index 4fe12d0..e541b1c 100644 --- a/canutils.changes +++ b/canutils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Aug 26 08:48:53 UTC 2019 - Jan Engelhardt + +- Add 0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch + to unbreak build with modern linux-glibc-devel. + ------------------------------------------------------------------- Sat Aug 25 06:41:34 UTC 2018 - jengelh@inai.de diff --git a/canutils.spec b/canutils.spec index c564432..e494763 100644 --- a/canutils.spec +++ b/canutils.spec @@ -22,10 +22,10 @@ License: GPL-2.0-only AND GPL-2.0-or-later AND BSD-3-Clause Group: Hardware/Other Version: 2018.02.0 Release: 0 -Url: https://github.com/linux-can/can-utils +URL: https://github.com/linux-can/can-utils -Source: can-utils-%version.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: https://github.com/linux-can/can-utils/archive/v%version.tar.gz +Patch1: 0001-fix-include-to-find-SIOCGSTAMP-with-latest-kernel.patch BuildRequires: libtool BuildRequires: pkg-config Obsoletes: canutils-linuxcan @@ -47,7 +47,7 @@ isotpsend, isotpserver, isotpsniffer, isotptun, log2asc, log2long, slcan_attach, slcand and slcanpty. %prep -%setup -q -n can-utils-%version +%autosetup -n can-utils-%version -p1 %build ./autogen.sh @@ -59,7 +59,6 @@ make %{?_smp_mflags} %make_install %files -%defattr(-,root,root) %_bindir/* %changelog diff --git a/can-utils-2018.02.0.tar.gz b/v2018.02.0.tar.gz similarity index 100% rename from can-utils-2018.02.0.tar.gz rename to v2018.02.0.tar.gz