Skip to contentSkip to conversation

ppp: fix building with linux-4.8

PATCH In review [email protected] 2 participants 6 messages Oct 14, 2016 – Oct 24, 2016

lore
Share & tools
lore
#0 lore raw

cover ppp: fix building with linux-4.8

From: Jackie Huang <[email protected]>

--
The following changes since commit 371ab635086e2878ada1f00a59c7ec826481ba0a:

build-appliance-image: Update to master head revision (2016-10-11 23:43:28 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib.git jhuang0/d_ppp-linux-4.8_161008-0
http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/d_ppp-linux-4.8_161008-0

Jackie Huang (2):
Revert "linux-libc-headers: fix in/if.h includes"
ppp: fix building with linux-4.8

 .../ppp/ppp/ppp-fix-building-with-linux-4.8.patch  | 44 ++++++++++++
 meta/recipes-connectivity/ppp/ppp_2.4.7.bb         |  1 +
 .../0001-ppp-fix-in-if.h-includes.patch            | 83 ----------------------
 .../linux-libc-headers/linux-libc-headers_4.8.bb   |  4 --
 4 files changed, 45 insertions(+), 87 deletions(-)
 create mode 100644 meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
 delete mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ppp-fix-in-if.h-includes.patch
Signature · 1 line
2.8.3
#1 lore raw

PATCH 1/2 Revert "linux-libc-headers: fix in/if.h includes"

From: Jackie Huang <[email protected]>

This issue is fixed in the ppp recipe.

This reverts commit 7c6b78ac8e2b176f77178c3dd12d8455be10845d.

---
 .../0001-ppp-fix-in-if.h-includes.patch            | 83 ----------------------
 .../linux-libc-headers/linux-libc-headers_4.8.bb   |  4 --
 2 files changed, 87 deletions(-)
 delete mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ppp-fix-in-if.h-includes.patch
meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-ppp-fix-in-if.h-includes.patch deleted +0 -83
deleted file mode 100644
index f31a539..0000000
@@ -1,83 +0,0 @@
-From 80f3064c378f8c919aa6450bd7833a154c184f7f Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <[email protected]>
-Date: Mon, 3 Oct 2016 01:18:13 -0400
-Subject: [PATCH] ppp: fix in/if.h includes
-
-The following kernel commits broke the compilation of ppp, due to redefined
-structures.
-
-Nothing else breaks in userspace with or without these uapi changes, so we
-revert them to keep everything building.
-		     
-   commit 05ee5de7451796cf9a8aeb2f05a57790d4fd2336
-   Author: Mikko Rapeli <[email protected]>
-   Date:   Mon Aug 22 20:32:42 2016 +0200
-
-       include/uapi/linux/if_pppol2tp.h: include linux/in.h and linux/in6.h
-
-       Fixes userspace compilation errors like:
-
-       error: field <E2><80><98>addr<E2><80><99> has incomplete type
-	struct sockaddr_in addr; /* IP address and port to send to */
-			   ^
-       error: field <E2><80><98>addr<E2><80><99> has incomplete type
-	struct sockaddr_in6 addr; /* IP address and port to send to */
-
-       Signed-off-by: Mikko Rapeli <[email protected]>
-       Signed-off-by: David S. Miller <[email protected]>
-
-   commit eafe92114308acf14e45c6c3d154a5dad5523d1a
-   Author: Mikko Rapeli <[email protected]>
-   Date:   Mon Aug 22 20:32:43 2016 +0200
-
-       include/uapi/linux/if_pppox.h: include linux/in.h and linux/in6.h
-
-       Fixes userspace compilation errors:
-
-       error: field <E2><80><98>addr<E2><80><99> has incomplete type
-	struct sockaddr_in addr; /* IP address and port to send to */
-
-       error: field <E2><80><98>addr<E2><80><99> has incomplete type
-	struct sockaddr_in6 addr; /* IP address and port to send to */
-
-       Signed-off-by: Mikko Rapeli <[email protected]>
-       Signed-off-by: David S. Miller <[email protected]>
-
-Signed-off-by: Bruce Ashfield <[email protected]>
----
- include/uapi/linux/if_pppol2tp.h | 2 --
- include/uapi/linux/if_pppox.h    | 3 ---
- 2 files changed, 5 deletions(-)
-
-diff --git a/include/uapi/linux/if_pppol2tp.h b/include/uapi/linux/if_pppol2tp.h
-index 4bd1f55..ca559c6 100644
---- a/include/uapi/linux/if_pppol2tp.h
-+++ b/include/uapi/linux/if_pppol2tp.h
-@@ -16,8 +16,6 @@
- #define _UAPI__LINUX_IF_PPPOL2TP_H
- 
- #include <linux/types.h>
--#include <linux/in.h>
--#include <linux/in6.h>
- 
- /* Structure used to connect() the socket to a particular tunnel UDP
-  * socket over IPv4.
-diff --git a/include/uapi/linux/if_pppox.h b/include/uapi/linux/if_pppox.h
-index d37bbb1..e128769 100644
---- a/include/uapi/linux/if_pppox.h
-+++ b/include/uapi/linux/if_pppox.h
-@@ -21,11 +21,8 @@
- #include <asm/byteorder.h>
- 
- #include <linux/socket.h>
--#include <linux/if.h>
- #include <linux/if_ether.h>
- #include <linux/if_pppol2tp.h>
--#include <linux/in.h>
--#include <linux/in6.h>
- 
- /* For user-space programs to pick up these definitions
-  * which they wouldn't get otherwise without defining __KERNEL__
--- 
-2.7.4
-
meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb +0 -4
index 778f0b6..77e0870 100644
@@ -8,9 +8,5 @@ SRC_URI_append_libc-musl = "\
     file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
    "
 
-SRC_URI_append = "\
-    file://0001-ppp-fix-in-if.h-includes.patch \
-    "
-
 SRC_URI[md5sum] = "c1af0afbd3df35c1ccdc7a5118cd2d07"
 SRC_URI[sha256sum] = "3e9150065f193d3d94bcf46a1fe9f033c7ef7122ab71d75a7fb5a2f0c9a7e11a"
Signature · 1 line
2.8.3
#2 lore raw

PATCH 2/2 ppp: fix building with linux-4.8

In reply to [email protected]

From: Jackie Huang <[email protected]>

Fix a build error when using the linux-4.8 headers that results in:

In file included from pppoe.h:87:0,

                 from plugin.c:29:
../usr/include/netinet/in.h:211:8: note: originally defined here
 struct in6_addr
        ^~~~~~~~
In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
                 from ../usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
 struct sockaddr_in6 {
        ^~~~~~~~~~~~
---
 .../ppp/ppp/ppp-fix-building-with-linux-4.8.patch  | 44 ++++++++++++++++++++++
 meta/recipes-connectivity/ppp/ppp_2.4.7.bb         |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch new file +44 -0
new file mode 100644
index 0000000..f77b0de
@@ -0,0 +1,44 @@
+From 3da19af53e2eee2e77b456cfbb9d633b06656d38 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <[email protected]>
+Date: Thu, 13 Oct 2016 13:41:43 +0800
+Subject: [PATCH] ppp: fix building with linux-4.8
+
+Fix a build error when using the linux-4.8 headers that results in:
+
+In file included from pppoe.h:87:0,
+                 from plugin.c:29:
+../usr/include/netinet/in.h:211:8: note: originally defined here
+ struct in6_addr
+        ^~~~~~~~
+In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
+                 from ../usr/include/linux/if_pppox.h:26,
+                 from plugin.c:52:
+../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
+ struct sockaddr_in6 {
+        ^~~~~~~~~~~~
+
+Upstream-Status: Submitted [1]
+
+[1] https://github.com/paulusmack/ppp/pull/69
+
+Signed-off-by: Jackie Huang <[email protected]>
+---
+ pppd/plugins/rp-pppoe/pppoe.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
+index 9ab2eee..96d2794 100644
+--- a/pppd/plugins/rp-pppoe/pppoe.h
++++ b/pppd/plugins/rp-pppoe/pppoe.h
+@@ -84,7 +84,7 @@ typedef unsigned long UINT32_t;
+ #include <linux/if_ether.h>
+ #endif
+ 
+-#include <netinet/in.h>
++#include <linux/in.h>
+ 
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+-- 
+2.8.3
+
meta/recipes-connectivity/ppp/ppp_2.4.7.bb +1 -0
index 4437b5c..56dbd98 100644
@@ -30,6 +30,7 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
            file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
            file://[email protected] \
            file://fix-CVE-2015-3310.patch \
+           file://ppp-fix-building-with-linux-4.8.patch \
 "
 
 SRC_URI_append_libc-musl = "\
Signature · 1 line
2.8.3
#3 lore raw

Dear Jackie,

this patch broke compilation with linux-libc-headers 4.4, present in morty, due to use of incomplete types.

Regards,
Andreas

Quoted 86 lines · On 14.10.2016 02:50, [email protected] wrote:

From: Jackie Huang <[email protected]>

Fix a build error when using the linux-4.8 headers that results in:

In file included from pppoe.h:87:0,

                 from plugin.c:29:
../usr/include/netinet/in.h:211:8: note: originally defined here
 struct in6_addr
        ^~~~~~~~
In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
                 from ../usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
 struct sockaddr_in6 {
        ^~~~~~~~~~~~
---
 .../ppp/ppp/ppp-fix-building-with-linux-4.8.patch  | 44 ++++++++++++++++++++++
 meta/recipes-connectivity/ppp/ppp_2.4.7.bb         |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch new file +44 -0
new file mode 100644
index 0000000..f77b0de
@@ -0,0 +1,44 @@
+From 3da19af53e2eee2e77b456cfbb9d633b06656d38 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <[email protected]>
+Date: Thu, 13 Oct 2016 13:41:43 +0800
+Subject: [PATCH] ppp: fix building with linux-4.8
+
+Fix a build error when using the linux-4.8 headers that results in:
+
+In file included from pppoe.h:87:0,
+                 from plugin.c:29:
+../usr/include/netinet/in.h:211:8: note: originally defined here
+ struct in6_addr
+        ^~~~~~~~
+In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
+                 from ../usr/include/linux/if_pppox.h:26,
+                 from plugin.c:52:
+../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
+ struct sockaddr_in6 {
+        ^~~~~~~~~~~~
+
+Upstream-Status: Submitted [1]
+
+[1] https://github.com/paulusmack/ppp/pull/69
+
+Signed-off-by: Jackie Huang <[email protected]>
+---
+ pppd/plugins/rp-pppoe/pppoe.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
+index 9ab2eee..96d2794 100644
+--- a/pppd/plugins/rp-pppoe/pppoe.h
++++ b/pppd/plugins/rp-pppoe/pppoe.h
+@@ -84,7 +84,7 @@ typedef unsigned long UINT32_t;
+ #include <linux/if_ether.h>
+ #endif
+ 
+-#include <netinet/in.h>
++#include <linux/in.h>
+ 
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+-- 
+2.8.3
+
meta/recipes-connectivity/ppp/ppp_2.4.7.bb +1 -0
index 4437b5c..56dbd98 100644
@@ -30,6 +30,7 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
            file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
            file://[email protected] \
            file://fix-CVE-2015-3310.patch \
+           file://ppp-fix-building-with-linux-4.8.patch \
 "
 
 SRC_URI_append_libc-musl = "\
#4 lore raw
Quoted 9 lines

-----Original Message-----
From: Andreas Oberritter [mailto:[email protected]]
Sent: Friday, October 21, 2016 10:01 PM
To: Huang, Jie (Jackie)
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 2/2] ppp: fix building with linux-4.8

Quoted 4 lines

Dear Jackie,

this patch broke compilation with linux-libc-headers 4.4, present in morty, due to use of incomplete types.

I didn't realize 4.4 is still be used, sorry about that, feel free to send patch to fix it if you have one already, if not, I will fix it later as follow-up.

Thanks,
Jackie

Quoted 94 lines

Regards,
Andreas

Quoted 16 lines · On 14.10.2016 02:50, [email protected] wrote:

From: Jackie Huang <[email protected]>

Fix a build error when using the linux-4.8 headers that results in:

In file included from pppoe.h:87:0,

                 from plugin.c:29:
../usr/include/netinet/in.h:211:8: note: originally defined here
 struct in6_addr
        ^~~~~~~~
In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
                 from ../usr/include/linux/if_pppox.h:26,
                 from plugin.c:52:
../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
 struct sockaddr_in6 {
        ^~~~~~~~~~~~

Review

Quoted 8 lines
---
 .../ppp/ppp/ppp-fix-building-with-linux-4.8.patch  | 44 ++++++++++++++++++++++
 meta/recipes-connectivity/ppp/ppp_2.4.7.bb         |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch
(quoted diff) +0 -0

b/meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch

meta/recipes-

Quoted 50 lines

new file mode 100644
index 0000000..f77b0de

meta/recipes-connectivity/ppp/ppp/ppp-fix-building-with-linux-4.8.patch new file +44 -0
@@ -0,0 +1,44 @@
+From 3da19af53e2eee2e77b456cfbb9d633b06656d38 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <[email protected]>
+Date: Thu, 13 Oct 2016 13:41:43 +0800
+Subject: [PATCH] ppp: fix building with linux-4.8
+
+Fix a build error when using the linux-4.8 headers that results in:
+
+In file included from pppoe.h:87:0,
+                 from plugin.c:29:
+../usr/include/netinet/in.h:211:8: note: originally defined here
+ struct in6_addr
+        ^~~~~~~~
+In file included from ../usr/include/linux/if_pppol2tp.h:20:0,
+                 from ../usr/include/linux/if_pppox.h:26,
+                 from plugin.c:52:
+../usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
+ struct sockaddr_in6 {
+        ^~~~~~~~~~~~
+
+Upstream-Status: Submitted [1]
+
+[1] https://github.com/paulusmack/ppp/pull/69
+
+Signed-off-by: Jackie Huang <[email protected]>
+---
+ pppd/plugins/rp-pppoe/pppoe.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
+index 9ab2eee..96d2794 100644
+--- a/pppd/plugins/rp-pppoe/pppoe.h
++++ b/pppd/plugins/rp-pppoe/pppoe.h
+@@ -84,7 +84,7 @@ typedef unsigned long UINT32_t;
+ #include <linux/if_ether.h>
+ #endif
+
+-#include <netinet/in.h>
++#include <linux/in.h>
+
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+--
+2.8.3
+
meta/recipes- renamed from meta/recipes-connectivity/ppp/ppp_2.4.7.bb +0 -0

connectivity/ppp/ppp_2.4.7.bb

Quoted 12 lines

index 4437b5c..56dbd98 100644

meta/recipes-connectivity/ppp/ppp_2.4.7.bb +1 -0
@@ -30,6 +30,7 @@ SRC_URI = "http://ppp.samba.org/ftp/ppp/ppp-${PV}.tar.gz \
            file://0001-ppp-Fix-compilation-errors-in-Makefile.patch \
            file://[email protected] \
            file://fix-CVE-2015-3310.patch \
+           file://ppp-fix-building-with-linux-4.8.patch \
 "
 
 SRC_URI_append_libc-musl = "\
#5 lore raw
Quoted 2 lines · Jie (Jackie)

I didn't realize 4.4 is still be used, sorry about that, feel free to send patch to fix it if you have one already, if not, I will fix it later as follow-up.

Thanks! I don't have a patch. I figured switching to linux-libc-headers-4.8 would be easier in the long run. Having set 4.4 as preferred version was just a leftover from a previous release, I think.

Regards,
Andreas