diff mbox series

[oe,warrior-next,08/10] linux-atm: Fix build with kernel headers 5.2+

Message ID d18181125c6024b1e170c46988c42261f5ab2ee5.1569801183.git.akuster808@gmail.com
State New
Headers show
Series None | expand

Commit Message

Armin Kuster Sept. 29, 2019, 11:55 p.m. UTC
From: Khem Raj <raj.khem@gmail.com>


Signed-off-by: Khem Raj <raj.khem@gmail.com>

(cherry picked from commit dff93352c83660f965771a3dc91f39ff23b685c5)
Signed-off-by: Armin Kuster <akuster808@gmail.com>

---
 ...mdump-Include-linux-sockios.h-for-SIOCGST.patch | 59 ++++++++++++++++++++++
 .../recipes-support/linux-atm/linux-atm_2.5.2.bb   |  1 +
 2 files changed, 60 insertions(+)
 create mode 100644 meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch

-- 
2.7.4

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch b/meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch
new file mode 100644
index 0000000..a54869d
--- /dev/null
+++ b/meta-networking/recipes-support/linux-atm/linux-atm/0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch
@@ -0,0 +1,59 @@ 
+From 4456e13880803a300e4b6f263ad22a37481b5df5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 29 Aug 2019 09:33:43 -0700
+Subject: [PATCH] saaldump,atmdump: Include linux/sockios.h for SIOCGSTAMP
+
+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.
+
+Fixes
+../../../linux-atm-2.5.2/src/maint/atmdump.c:142:18: error: use of undeclared identifier 'SIOCGSTAMP'
+            if (ioctl(s,SIOCGSTAMP,&stamp) < 0) {
+                        ^
+1 error generated.
+make[3]: *** [Makefile:623: atmdump.o] Error 1
+make[3]: *** Waiting for unfinished jobs....
+../../../linux-atm-2.5.2/src/maint/saaldump.c:169:14: error: use of undeclared identifier 'SIOCGSTAMP'
+        if (ioctl(s,SIOCGSTAMP,&stamp) < 0) {
+                    ^
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/maint/atmdump.c  | 2 +-
+ src/maint/saaldump.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/maint/atmdump.c b/src/maint/atmdump.c
+index 8b17826..9e4853b 100644
+--- a/src/maint/atmdump.c
++++ b/src/maint/atmdump.c
+@@ -5,7 +5,7 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+-
++#include <linux/sockios.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <unistd.h>
+diff --git a/src/maint/saaldump.c b/src/maint/saaldump.c
+index 83bdde9..69429a8 100644
+--- a/src/maint/saaldump.c
++++ b/src/maint/saaldump.c
+@@ -5,7 +5,7 @@
+ #if HAVE_CONFIG_H
+ #include <config.h>
+ #endif
+-
++#include <linux/sockios.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <stdio.h>
+-- 
+2.23.0
+
diff --git a/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb b/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
index 9ed7ca6..e594906 100644
--- a/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
+++ b/meta-networking/recipes-support/linux-atm/linux-atm_2.5.2.bb
@@ -12,6 +12,7 @@  SRC_URI = "http://nchc.dl.sourceforge.net/project/${BPN}/${BPN}/${PV}/${BPN}-${P
            file://0001-ttcp-Add-printf-format-string.patch \
            file://0003-mpoad-Drop-old-hack-to-compile-with-very-old-glibc.patch \
            file://0001-IFNAMSIZ-is-defined-in-net-if.h.patch \
+           file://0001-saaldump-atmdump-Include-linux-sockios.h-for-SIOCGST.patch \
 "
 
 SRC_URI_append_libc-musl = " file://musl-no-on_exit.patch"