diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-03-25 18:40:54 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-03-25 18:40:54 +0000 |
commit | d2bf04f6c61c8900da1ee537b3a630a484d2d2a8 (patch) | |
tree | 013ffbfcb161b409461d141afe798fce45c8d1b5 /main | |
parent | e1f4fcf83fb502adee53388e7722721f2c11d2e3 (diff) | |
download | aports-d2bf04f6c61c8900da1ee537b3a630a484d2d2a8.tar.bz2 aports-d2bf04f6c61c8900da1ee537b3a630a484d2d2a8.tar.xz |
main/linux-headers: musl compat fixes
Diffstat (limited to 'main')
5 files changed, 147 insertions, 4 deletions
diff --git a/main/linux-headers/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch b/main/linux-headers/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch new file mode 100644 index 0000000000..0b4cfb1220 --- /dev/null +++ b/main/linux-headers/1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch @@ -0,0 +1,12 @@ +--- ./include/uapi/linux/kernel.h.orig ++++ ./include/uapi/linux/kernel.h +@@ -1,7 +1,9 @@ + #ifndef _UAPI_LINUX_KERNEL_H + #define _UAPI_LINUX_KERNEL_H + ++#ifdef __GLIBC__ + #include <linux/sysinfo.h> ++#endif + + /* + * 'kernel.h' contains some often-used function prototypes etc diff --git a/main/linux-headers/2-4-if_bridge.h-needs-struct-in6_addr.patch b/main/linux-headers/2-4-if_bridge.h-needs-struct-in6_addr.patch new file mode 100644 index 0000000000..8ed26560db --- /dev/null +++ b/main/linux-headers/2-4-if_bridge.h-needs-struct-in6_addr.patch @@ -0,0 +1,10 @@ +--- ./include/uapi/linux/if_bridge.h.orig ++++ ./include/uapi/linux/if_bridge.h +@@ -15,6 +15,7 @@ + + #include <linux/types.h> + #include <linux/if_ether.h> ++#include <linux/in6.h> + + #define SYSFS_BRIDGE_ATTR "bridge" + #define SYSFS_BRIDGE_FDB "brforward" diff --git a/main/linux-headers/3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch b/main/linux-headers/3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch new file mode 100644 index 0000000000..e4ce3d6547 --- /dev/null +++ b/main/linux-headers/3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch @@ -0,0 +1,61 @@ +--- ./include/uapi/linux/libc-compat.h.orig ++++ ./include/uapi/linux/libc-compat.h +@@ -48,35 +48,26 @@ + #ifndef _UAPI_LIBC_COMPAT_H + #define _UAPI_LIBC_COMPAT_H + +-/* We have included glibc headers... */ +-#if defined(__GLIBC__) ++#ifndef __KERNEL__ /* we're used from userspace */ + +-/* Coordinate with glibc netinet/in.h header. */ +-#if defined(_NETINET_IN_H) ++/* Coordinate with libc netinet/in.h header. */ ++#ifdef _NETINET_IN_H + + /* GLIBC headers included first so don't define anything + * that would already be defined. */ + #define __UAPI_DEF_IN6_ADDR 0 +-/* The exception is the in6_addr macros which must be defined +- * if the glibc code didn't define them. This guard matches +- * the guard in glibc/inet/netinet/in.h which defines the +- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ +-#if defined(__USE_MISC) || defined (__USE_GNU) + #define __UAPI_DEF_IN6_ADDR_ALT 0 +-#else +-#define __UAPI_DEF_IN6_ADDR_ALT 1 +-#endif + #define __UAPI_DEF_SOCKADDR_IN6 0 + #define __UAPI_DEF_IPV6_MREQ 0 + #define __UAPI_DEF_IPPROTO_V6 0 + +-#else ++#else /* defined(_NETINET_IN_H) */ + + /* Linux headers included first, and we must define everything +- * we need. The expectation is that glibc will check the ++ * we need. The expectation is that the libc will check the + * __UAPI_DEF_* defines and adjust appropriately. */ + #define __UAPI_DEF_IN6_ADDR 1 +-/* We unconditionally define the in6_addr macros and glibc must ++/* We unconditionally define the in6_addr macros and the libc must + * coordinate. */ + #define __UAPI_DEF_IN6_ADDR_ALT 1 + #define __UAPI_DEF_SOCKADDR_IN6 1 +@@ -89,7 +80,7 @@ + /* If we did not see any headers from any supported C libraries, + * or we are being included in the kernel, then define everything + * that we need. */ +-#else /* !defined(__GLIBC__) */ ++#else /* __KERNEL__ */ + + /* Definitions for in6.h */ + #define __UAPI_DEF_IN6_ADDR 1 +@@ -98,6 +89,6 @@ + #define __UAPI_DEF_IPV6_MREQ 1 + #define __UAPI_DEF_IPPROTO_V6 1 + +-#endif /* __GLIBC__ */ ++#endif /* __KERNEL__ */ + + #endif /* _UAPI_LIBC_COMPAT_H */ diff --git a/main/linux-headers/4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/main/linux-headers/4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch new file mode 100644 index 0000000000..b8ac94fb07 --- /dev/null +++ b/main/linux-headers/4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch @@ -0,0 +1,39 @@ +--- ./include/uapi/linux/if_ether.h.orig ++++ ./include/uapi/linux/if_ether.h +@@ -22,6 +22,7 @@ + #define _UAPI_LINUX_IF_ETHER_H + + #include <linux/types.h> ++#include <linux/libc-compat.h> + + /* + * IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble +@@ -130,11 +131,12 @@ + * This is an Ethernet frame header. + */ + ++#if __UAPI_DEF_ETHHDR + struct ethhdr { + unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ + unsigned char h_source[ETH_ALEN]; /* source ether addr */ + __be16 h_proto; /* packet type ID field */ + } __attribute__((packed)); +- ++#endif + + #endif /* _UAPI_LINUX_IF_ETHER_H */ +--- ./include/uapi/linux/libc-compat.h.orig ++++ ./include/uapi/linux/libc-compat.h +@@ -50,6 +50,12 @@ + + #ifndef __KERNEL__ /* we're used from userspace */ + ++#ifdef _NETINET_IF_ETHER_H /* musl */ ++#define __UAPI_DEF_ETHHDR 0 ++#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */ ++#define __UAPI_DEF_ETHHDR 1 ++#endif ++ + /* Coordinate with libc netinet/in.h header. */ + #ifdef _NETINET_IN_H + diff --git a/main/linux-headers/APKBUILD b/main/linux-headers/APKBUILD index 9eb858f26c..5f71ab0933 100644 --- a/main/linux-headers/APKBUILD +++ b/main/linux-headers/APKBUILD @@ -2,7 +2,7 @@ pkgname=linux-headers pkgver=3.12.6 _kernver=${pkgver#.*} -pkgrel=0 +pkgrel=1 pkgdesc="Linux system headers" url="http://kernel.org" arch="all" @@ -11,6 +11,10 @@ makedepends="perl" options="!strip !tracedeps" source="ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.bz2 ftp://ftp.kernel.org/pub/linux/kernel/v3.x/patch-$pkgver.bz2 + 1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch + 2-4-if_bridge.h-needs-struct-in6_addr.patch + 3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch + 4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch " prepare() { @@ -18,6 +22,11 @@ prepare() { if [ "$_kernver" != "$pkgver" ]; then bunzip2 -c < "$srcdir"/patch-$pkgver.bz2 | patch -p1 || return 1 fi + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done } build() { @@ -43,8 +52,20 @@ package() { } md5sums="2e1e42cf9c164d8c24bc1e33bb3c7b2b linux-3.12.6.tar.bz2 -07be8721b6e11cb2496c812f2d06c7e7 patch-3.12.6.bz2" +07be8721b6e11cb2496c812f2d06c7e7 patch-3.12.6.bz2 +e67087052d36eeb372d3da38a5c9486e 1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch +a25f2e32092cbab1919224f554d3c9d8 2-4-if_bridge.h-needs-struct-in6_addr.patch +c26b88cbf5389c2033d404a0fb58d8d2 3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch +81247cedb2fe3337edb946d9e8a812c2 4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch" sha256sums="ae11685a95e28fd16c485dbdd81f682a0ce74f4e3174d9e6ca8e3af0557006e2 linux-3.12.6.tar.bz2 -8284a7d81509f12f6f2a9cd813aabc9f6384db17b1fd9687948e6e4fda33c4c2 patch-3.12.6.bz2" +8284a7d81509f12f6f2a9cd813aabc9f6384db17b1fd9687948e6e4fda33c4c2 patch-3.12.6.bz2 +eea3758ded887b84e3b15031e590975b4f94dbf7b03e7b135611339bcb8ca81c 1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch +738fabbf6ed2b94fe08ed998302e5f2dfd37855f0bbbda27f7c92872706a0495 2-4-if_bridge.h-needs-struct-in6_addr.patch +9dc049392ba3b79453baa809f0aafb47283293046b84511b5ae8519a86716048 3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch +3297454dd7bdc3417d36f448ca2091e39a6acf475e22c6eb67ee5819d7b73c8f 4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch" sha512sums="9d3c7cddabc7d0ba973d9bec56e88754e8041579bc8e3ee79cac08b8159c40eb46b2209719f10911f4052f9f958e15145e473751151d587613edcca7aaa803e9 linux-3.12.6.tar.bz2 -346a295909ee4538307a91400054b8df62347d23c9c6a71ed9e98a3d6b005b9387aa62277f3a62f3ab8bff4e5096796d4528197f8da625a85d7ef10b000b7390 patch-3.12.6.bz2" +346a295909ee4538307a91400054b8df62347d23c9c6a71ed9e98a3d6b005b9387aa62277f3a62f3ab8bff4e5096796d4528197f8da625a85d7ef10b000b7390 patch-3.12.6.bz2 +8ff3af26ac01d402641d6c775ad54922a73e5eaf1e41efe842448d08c59f51ab9290104008283fafbdacd9eb1b8e48e9d2507210a8531d05a852c6ba84d2b60e 1-4-glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch +34c0560714d93fd69cde19700d4927860444e9a24f1fbbbdf58c966601e8a792ae2d9d6cd229e26c41425f34e1d93cbfe59cd8a8587983e653efcf2a54b3d177 2-4-if_bridge.h-needs-struct-in6_addr.patch +6d6107974dcf9671dd0f1a747160adf85a22c27216b1200ce40fd410f6fc5fd47956b8b5b51055cfda4b97cc9f172cd3850ccb4daa73e4eda449e6e77c0840ca 3-4-libc-compat.h-fix-some-issues-arising-from-in6.h.patch +895e23a36d0736ff624ad960e8a26e221d990e50910cc96b1a151789f97b94288f3e801ad76d141e421901e66422c480e511b2e20798e91a15b9e298c72533d6 4-4-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch" |