Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dialup/linux-atm/, net-dialup/linux-atm/files/
Date: Sat, 20 Jul 2019 11:45:29
Message-Id: 1563623119.408621819a85bf67a73efd33a06ea371c20ea5a2.slyfox@gentoo
1 commit: 408621819a85bf67a73efd33a06ea371c20ea5a2
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 20 11:45:09 2019 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 20 11:45:19 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40862181
7
8 net-dialup/linux-atm: tweak for linux-headers-5.2
9
10 Package-Manager: Portage-2.3.69, Repoman-2.3.16
11 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
12
13 .../linux-atm-2.5.2-linux-5.2-SIOCGSTAMP.patch | 41 ++++++++++++++++++++++
14 net-dialup/linux-atm/linux-atm-2.5.2.ebuild | 1 +
15 2 files changed, 42 insertions(+)
16
17 diff --git a/net-dialup/linux-atm/files/linux-atm-2.5.2-linux-5.2-SIOCGSTAMP.patch b/net-dialup/linux-atm/files/linux-atm-2.5.2-linux-5.2-SIOCGSTAMP.patch
18 new file mode 100644
19 index 00000000000..ff91c7f16e0
20 --- /dev/null
21 +++ b/net-dialup/linux-atm/files/linux-atm-2.5.2-linux-5.2-SIOCGSTAMP.patch
22 @@ -0,0 +1,41 @@
23 +Fix build failure against linux-5.2+:
24 + https://www.spinics.net/lists/linux-sh/msg53430.html
25 +
26 +--- a/src/maint/atmdump.c
27 ++++ b/src/maint/atmdump.c
28 +@@ -17,6 +17,16 @@
29 + #include <netinet/in.h> /* for htonl and ntohl */
30 + #include <atm.h>
31 +
32 ++#ifndef SIOCGSTAMP
33 ++/* linux-5.2+ added support for 64-bit time_t into ioctls
34 ++ that support 'struct timeval' and removed 'SIOCGSTAMP'
35 ++ define.
36 ++
37 ++ Include 'SIOCGSTAMP' wrapper via linux/sockios.h
38 ++ if does not exist.
39 ++ */
40 ++# include <linux/sockios.h>
41 ++#endif
42 +
43 + static const char *pti[] = { "Data SDU 0","Data SDU 1","Data SDU 0, CE",
44 + "Data SDU 1, CE","Segment OAM F5","End-to-end OAM F5","Reserved (RM)",
45 +--- a/src/maint/saaldump.c
46 ++++ b/src/maint/saaldump.c
47 +@@ -24,6 +24,16 @@
48 +
49 + #define MAX_ITEM 2048 /* longest string emitted by q.dump */
50 +
51 ++#ifndef SIOCGSTAMP
52 ++/* linux-5.2+ added support for 64-bit time_t into ioctls
53 ++ that support 'struct timeval' and removed 'SIOCGSTAMP'
54 ++ define.
55 ++
56 ++ Include 'SIOCGSTAMP' wrapper via linux/sockios.h
57 ++ if does not exist.
58 ++ */
59 ++# include <linux/sockios.h>
60 ++#endif
61 +
62 + static int interval = 0; /* display absolute time by default */
63 + static int quiet = 0; /* decode Q.2931 messages by default */
64
65 diff --git a/net-dialup/linux-atm/linux-atm-2.5.2.ebuild b/net-dialup/linux-atm/linux-atm-2.5.2.ebuild
66 index 3ea9f3d5e19..7bc4fa72eed 100644
67 --- a/net-dialup/linux-atm/linux-atm-2.5.2.ebuild
68 +++ b/net-dialup/linux-atm/linux-atm-2.5.2.ebuild
69 @@ -25,6 +25,7 @@ CONFIG_CHECK="~ATM"
70
71 src_prepare() {
72 epatch "${FILESDIR}"/${P}-headers.patch
73 + epatch "${FILESDIR}"/${P}-linux-5.2-SIOCGSTAMP.patch
74
75 sed -i '/#define _LINUX_NETDEVICE_H/d' \
76 src/arpd/*.c || die "sed command on arpd/*.c files failed"