]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
linux-atm: fix build with kernel >= 5.2
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 7 Jan 2021 13:45:19 +0000 (14:45 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 7 Feb 2021 16:42:11 +0000 (11:42 -0500)
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
lfs/linux-atm
src/patches/linux-atm-2.4.1-linux-5.2-SIOCGSTAMP.patch [new file with mode: 0644]

index 129109b3ff25d4fe3f3d3fabb725a16d44a77039..f8bf77877f43c3f06d9a3f82b3e9b817e62fa9ab 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2018  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2021  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -75,6 +75,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        $(UPDATE_AUTOMAKE)
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-atm-2.4.1-gcc-4.patch
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-atm-2.4.1-arpd_includes.patch
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux-atm-2.4.1-linux-5.2-SIOCGSTAMP.patch
        cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc --disable-nls
        cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE)
        cd $(DIR_APP) && make install
diff --git a/src/patches/linux-atm-2.4.1-linux-5.2-SIOCGSTAMP.patch b/src/patches/linux-atm-2.4.1-linux-5.2-SIOCGSTAMP.patch
new file mode 100644 (file)
index 0000000..ff91c7f
--- /dev/null
@@ -0,0 +1,41 @@
+Fix build failure against linux-5.2+:
+  https://www.spinics.net/lists/linux-sh/msg53430.html
+
+--- a/src/maint/atmdump.c
++++ b/src/maint/atmdump.c
+@@ -17,6 +17,16 @@
+ #include <netinet/in.h> /* for htonl and ntohl */
+ #include <atm.h>
++#ifndef SIOCGSTAMP
++/* linux-5.2+ added support for 64-bit time_t into ioctls
++   that support 'struct timeval' and removed 'SIOCGSTAMP'
++   define.
++
++   Include 'SIOCGSTAMP' wrapper via linux/sockios.h
++   if does not exist.
++  */
++#    include <linux/sockios.h>
++#endif
+ static const char *pti[] = { "Data SDU 0","Data SDU 1","Data SDU 0, CE",
+   "Data SDU 1, CE","Segment OAM F5","End-to-end OAM F5","Reserved (RM)",
+--- a/src/maint/saaldump.c
++++ b/src/maint/saaldump.c
+@@ -24,6 +24,16 @@
+ #define MAX_ITEM  2048 /* longest string emitted by q.dump */
++#ifndef SIOCGSTAMP
++/* linux-5.2+ added support for 64-bit time_t into ioctls
++   that support 'struct timeval' and removed 'SIOCGSTAMP'
++   define.
++
++   Include 'SIOCGSTAMP' wrapper via linux/sockios.h
++   if does not exist.
++  */
++#    include <linux/sockios.h>
++#endif
+ static int interval = 0; /* display absolute time by default */
+ static int quiet = 0; /* decode Q.2931 messages by default */