Skip to contentSkip to conversation

avr32: fix uclibc build using recent kernel headers

PATCH New spdawson at gmail.com 2 participants 2 messages Nov 8, 2013 – Nov 10, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 avr32: fix uclibc build using recent kernel headers

From: Simon Dawson <[email protected]>

Using kernel headers newer than 3.6.x, uclibc 0.9.31.1 fails to build:

In file included from output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/rtnetlink.h:6,

                 from libc/inet/netlinkaccess.h:34,
                 from libc/inet/if_index.c:36:

output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/if_link.h:314: error: expected specifier-qualifier-list before '__be16' make[1]: *** [libc/inet/if_index.os] Error 1
make[1]: Leaving directory `output/build/uclibc-0.9.31.1'
make: *** [output/build/uclibc-0.9.31.1/.stamp_built] Error 2

This patch adjusts the system type definitions in the netlinkaccess.h header, updating the types to match those used in uClibc 0.9.33.2.

---
 ...ibc-0012-netlinkaccess-header-types.patch.avr32 | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0012-netlinkaccess-header-types.patch.avr32
package/uclibc/0.9.31.1/uClibc-0012-netlinkaccess-header-types.patch.avr32 new file +35 -0
new file mode 100644
index 0000000..bc981a4
@@ -0,0 +1,35 @@
+Using kernel headers newer than 3.6.x, uclibc 0.9.31.1 fails to build:
+
+  In file included from output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/rtnetlink.h:6,
+                 from libc/inet/netlinkaccess.h:34,
+                 from libc/inet/if_index.c:36:
+  output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/if_link.h:314: error: expected specifier-qualifier-list before '__be16'
+  make[1]: *** [libc/inet/if_index.os] Error 1
+  make[1]: Leaving directory `output/build/uclibc-0.9.31.1'
+  make: *** [output/build/uclibc-0.9.31.1/.stamp_built] Error 2
+
+This patch adjusts the system type definitions in the netlinkaccess.h
+header, updating the types to match those used in uClibc 0.9.33.2.
+
+Signed-off-by: Simon Dawson <[email protected]>
+
+diff -Nurp a/libc/inet/netlinkaccess.h b/libc/inet/netlinkaccess.h
+--- a/libc/inet/netlinkaccess.h	2011-06-08 19:58:40.000000000 +0100
++++ b/libc/inet/netlinkaccess.h	2012-12-20 12:16:34.251965672 +0000
+@@ -22,15 +22,8 @@
+ #include <features.h>
+ #include <stdint.h>
+ #include <unistd.h>
+-#include <sys/types.h>
+-
+ #if defined __ASSUME_NETLINK_SUPPORT || defined __UCLIBC_USE_NETLINK__
+-#define _LINUX_TYPES_H
+-typedef uint8_t __u8;
+-typedef uint16_t __u16;
+-typedef uint32_t __u32;
+-typedef uint64_t __u64;
+-typedef int32_t __s32;
++#include <asm/types.h>
+ #include <linux/rtnetlink.h>
+ #include <linux/netlink.h>
+ 
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/1 avr32: fix uclibc build using recent kernel headers

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"spdawson" == spdawson <[email protected]> writes:

From: Simon Dawson <[email protected]>
Using kernel headers newer than 3.6.x, uclibc 0.9.31.1 fails to build:

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard