* update linux-atm to 2.5.2-8

This commit is contained in:
Alexander Baldeck 2023-04-03 12:44:53 +02:00
parent b27ab13bf7
commit 43c569803e
5 changed files with 52 additions and 47 deletions

View File

@ -1,47 +0,0 @@
Description: New kernel 5.2 moved around some definitions of constants, adding the necessary includes
Author: Gianfranco Costamagna <locutusofborg@debian.org>
---
Forwarded: no
Last-Update: 2019-07-19
--- linux-atm-2.5.1.orig/src/arpd/arp.c
+++ linux-atm-2.5.1/src/arpd/arp.c
@@ -17,6 +17,7 @@
#include <netinet/in.h> /* for ntohs, etc. */
#define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */
#include <linux/types.h>
+#include <linux/if.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <atm.h>
--- linux-atm-2.5.1.orig/src/arpd/itf.c
+++ linux-atm-2.5.1/src/arpd/itf.c
@@ -14,6 +14,7 @@
#include <sys/socket.h>
#define _LINUX_NETDEVICE_H /* glibc2 */
#include <linux/types.h>
+#include <linux/if.h>
#include <linux/if_arp.h>
#include "atmd.h"
--- linux-atm-2.5.1.orig/src/maint/atmdump.c
+++ linux-atm-2.5.1/src/maint/atmdump.c
@@ -14,6 +14,7 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
+#include <linux/sockios.h>
#include <netinet/in.h> /* for htonl and ntohl */
#include <atm.h>
--- linux-atm-2.5.1.orig/src/maint/saaldump.c
+++ linux-atm-2.5.1/src/maint/saaldump.c
@@ -15,6 +15,7 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <linux/sockios.h>
#include <atm.h>
#include "pdu.h"

View File

@ -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 */

View File

@ -0,0 +1,11 @@
--- linux-atm-2.5.1-orig/src/test/ttcp.c 2017-05-28 12:16:24.984611487 +0000
+++ linux-atm-2.5.1/src/test/ttcp.c 2017-05-28 12:17:25.370338343 +0000
@@ -663,7 +663,7 @@ int no_check = 0;
exit(0);
usage:
- fprintf(stderr, Usage);
+ fprintf(stderr, "%s", Usage);
exit(1);
}