All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-fsl-ppc][PATCH] usdpaa-apps: use in6_* macros from glibc instead of kernel
@ 2015-12-22 16:07 b28495
  2015-12-22 16:48 ` Otavio Salvador
  0 siblings, 1 reply; 2+ messages in thread
From: b28495 @ 2015-12-22 16:07 UTC (permalink / raw)
  To: meta-freescale

From: Ting Liu <ting.liu@freescale.com>

Both glibc and the kernel have in6_* macros definition. Use the one from glibc.
Kernel headers will check for previous libc definitions by including
include/linux/libc-compat.h.

Fix the below build error:
|  [CC] xfrm_km.c                           (bin:srio_ipsec_offload)
| In file included from .../tmp/sysroots/b4860qds-64b/usr/include/linux/xfrm.h:4:0,
|                  from src/srio_ipsec_offload/xfrm_km.c:46:
| .../usr/include/netinet/in.h:99:5: error: expected identifier before numeric constant
|      IPPROTO_HOPOPTS = 0,   /* IPv6 Hop-by-Hop options.  */
|      ^
| In file included from .../tmp/sysroots/b4860qds-64b/usr/include/netinet/ip.h:24:0,
|                  from src/srio_ipsec_offload/xfrm_km.c:52:
| .../tmp/sysroots/b4860qds-64b/usr/include/netinet/in.h:209:8: error: redefinition of 'struct in6_addr'
|  struct in6_addr
|         ^
| In file included from .../tmp/sysroots/b4860qds-64b/usr/include/linux/xfrm.h:4:0,
|                  from src/srio_ipsec_offload/xfrm_km.c:46:
| .../tmp/sysroots/b4860qds-64b/usr/include/linux/in6.h:32:8: note: originally defined here
|  struct in6_addr {
|         ^

Signed-off-by: Ting Liu <ting.liu@freescale.com>
---
 ...se-in6_-macros-from-glibc-instead-of-kern.patch | 49 ++++++++++++++++++++++
 recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb        |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 recipes-dpaa/usdpaa-apps/usdpaa-apps/xfrm_km.c-use-in6_-macros-from-glibc-instead-of-kern.patch

diff --git a/recipes-dpaa/usdpaa-apps/usdpaa-apps/xfrm_km.c-use-in6_-macros-from-glibc-instead-of-kern.patch b/recipes-dpaa/usdpaa-apps/usdpaa-apps/xfrm_km.c-use-in6_-macros-from-glibc-instead-of-kern.patch
new file mode 100644
index 0000000..c6d35f0
--- /dev/null
+++ b/recipes-dpaa/usdpaa-apps/usdpaa-apps/xfrm_km.c-use-in6_-macros-from-glibc-instead-of-kern.patch
@@ -0,0 +1,49 @@
+From 1e1e8d74db98faed57a5a62788e1226801661e0e Mon Sep 17 00:00:00 2001
+From: Ting Liu <ting.liu@freescale.com>
+Date: Tue, 22 Dec 2015 23:37:49 +0800
+Subject: [PATCH] xfrm_km.c: use in6_* macros from glibc instead of kernel
+
+Both glibc and the kernel have in6_* macros definition. Use the one from glibc.
+Kernel headers will check for previous libc definitions by including
+include/linux/libc-compat.h.
+
+Fix the below build error:
+|  [CC] xfrm_km.c                           (bin:srio_ipsec_offload)
+| In file included from .../tmp/sysroots/b4860qds-64b/usr/include/linux/xfrm.h:4:0,
+|                  from src/srio_ipsec_offload/xfrm_km.c:46:
+| .../usr/include/netinet/in.h:99:5: error: expected identifier before numeric constant
+|      IPPROTO_HOPOPTS = 0,   /* IPv6 Hop-by-Hop options.  */
+|      ^
+| In file included from .../tmp/sysroots/b4860qds-64b/usr/include/netinet/ip.h:24:0,
+|                  from src/srio_ipsec_offload/xfrm_km.c:52:
+| .../tmp/sysroots/b4860qds-64b/usr/include/netinet/in.h:209:8: error: redefinition of 'struct in6_addr'
+|  struct in6_addr
+|         ^
+| In file included from .../tmp/sysroots/b4860qds-64b/usr/include/linux/xfrm.h:4:0,
+|                  from src/srio_ipsec_offload/xfrm_km.c:46:
+| .../tmp/sysroots/b4860qds-64b/usr/include/linux/in6.h:32:8: note: originally defined here
+|  struct in6_addr {
+|         ^
+
+Upstream-Status: Pending
+
+Signed-off-by: Ting Liu <ting.liu@freescale.com>
+---
+ src/srio_ipsec_offload/xfrm_km.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/srio_ipsec_offload/xfrm_km.c b/src/srio_ipsec_offload/xfrm_km.c
+index df23fd1..d69aafa 100644
+--- a/src/srio_ipsec_offload/xfrm_km.c
++++ b/src/srio_ipsec_offload/xfrm_km.c
+@@ -42,6 +42,7 @@
+ #include <linux/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
++#include <netinet/in.h>
+ #include <linux/netlink.h>
+ #include <linux/xfrm.h>
+ #include <sched.h>
+-- 
+1.9.2
+
diff --git a/recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb b/recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb
index 837c45a..57b7546 100644
--- a/recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb
+++ b/recipes-dpaa/usdpaa-apps/usdpaa-apps_git.bb
@@ -16,6 +16,7 @@ RDEPENDS_${PN}_append_b4420qds = " ipc-ust"
 
 SRC_URI = "git://git.freescale.com/ppc/sdk/usdpaa/usdpaa-apps;nobranch=1 \
     file://fix-the-inline-function-definition-with-gcc-5.x.patch \
+    file://xfrm_km.c-use-in6_-macros-from-glibc-instead-of-kern.patch \
 "
 SRCREV = "95744440cf214d73884c44c0dbc296e1e4b4c8f4"
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-fsl-ppc][PATCH] usdpaa-apps: use in6_* macros from glibc instead of kernel
  2015-12-22 16:07 [meta-fsl-ppc][PATCH] usdpaa-apps: use in6_* macros from glibc instead of kernel b28495
@ 2015-12-22 16:48 ` Otavio Salvador
  0 siblings, 0 replies; 2+ messages in thread
From: Otavio Salvador @ 2015-12-22 16:48 UTC (permalink / raw)
  To: Liu Ting-B28495; +Cc: meta-freescale

On Tue, Dec 22, 2015 at 2:07 PM,  <b28495@freescale.com> wrote:
> From: Ting Liu <ting.liu@freescale.com>
>
> Both glibc and the kernel have in6_* macros definition. Use the one from glibc.
> Kernel headers will check for previous libc definitions by including
> include/linux/libc-compat.h.
>
> Fix the below build error:
> |  [CC] xfrm_km.c                           (bin:srio_ipsec_offload)
> | In file included from .../tmp/sysroots/b4860qds-64b/usr/include/linux/xfrm.h:4:0,
> |                  from src/srio_ipsec_offload/xfrm_km.c:46:
> | .../usr/include/netinet/in.h:99:5: error: expected identifier before numeric constant
> |      IPPROTO_HOPOPTS = 0,   /* IPv6 Hop-by-Hop options.  */
> |      ^
> | In file included from .../tmp/sysroots/b4860qds-64b/usr/include/netinet/ip.h:24:0,
> |                  from src/srio_ipsec_offload/xfrm_km.c:52:
> | .../tmp/sysroots/b4860qds-64b/usr/include/netinet/in.h:209:8: error: redefinition of 'struct in6_addr'
> |  struct in6_addr
> |         ^
> | In file included from .../tmp/sysroots/b4860qds-64b/usr/include/linux/xfrm.h:4:0,
> |                  from src/srio_ipsec_offload/xfrm_km.c:46:
> | .../tmp/sysroots/b4860qds-64b/usr/include/linux/in6.h:32:8: note: originally defined here
> |  struct in6_addr {
> |         ^
>
> Signed-off-by: Ting Liu <ting.liu@freescale.com>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-22 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22 16:07 [meta-fsl-ppc][PATCH] usdpaa-apps: use in6_* macros from glibc instead of kernel b28495
2015-12-22 16:48 ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.