aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-04-01 20:05:18 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-04-01 20:05:18 -0400
commite674fd52ca2a26af722a2577a9194e9e2fb683c8 (patch)
treee0c9e899b29f7702dfe2547cc441e4842747c48f /sys-kernel
parentapp-misc/tmux: drop to just musl supported arches (diff)
downloadmusl-e674fd52ca2a26af722a2577a9194e9e2fb683c8.tar.gz
musl-e674fd52ca2a26af722a2577a9194e9e2fb683c8.tar.bz2
musl-e674fd52ca2a26af722a2577a9194e9e2fb683c8.zip
sys-kernel/linux-headers: push out patch in bug #544476
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/linux-headers/Manifest4
-rw-r--r--sys-kernel/linux-headers/files/libc-4.3-portability.patch120
-rw-r--r--sys-kernel/linux-headers/linux-headers-4.5-r99.ebuild57
3 files changed, 181 insertions, 0 deletions
diff --git a/sys-kernel/linux-headers/Manifest b/sys-kernel/linux-headers/Manifest
index 524af7a2..dd6d0531 100644
--- a/sys-kernel/linux-headers/Manifest
+++ b/sys-kernel/linux-headers/Manifest
@@ -1,10 +1,14 @@
AUX glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch 275 SHA256 eea3758ded887b84e3b15031e590975b4f94dbf7b03e7b135611339bcb8ca81c SHA512 8ff3af26ac01d402641d6c775ad54922a73e5eaf1e41efe842448d08c59f51ab9290104008283fafbdacd9eb1b8e48e9d2507210a8531d05a852c6ba84d2b60e WHIRLPOOL 2cd90e18615df2f1be80c83d0d2e218d6d02437b2ea91ba3a61ced407357f972371bddfed140f18ec66817e7f6ddd61a1c85da7f9b14be04f71ca3e64c8fb687
+AUX libc-4.3-portability.patch 3908 SHA256 cdd4a603361bb3e3e776b360460ce5df8247aa64fb06d62801fec2761ac0ae0c SHA512 7b577f7b0a489274685fc9af9234cd6fd00a033342e62c38601b3e663798b1af8e053f7df2a6d78fadcbf2e582ca25bfcc45259f01bc08c46d3d846a2b397eb3 WHIRLPOOL 415fb348b873dc3138e4cd2265b6be9a47bb92f05a8bc38c317edf1e0257312a169958774a3c03c621977769436027ca8768d868459e484392afff9f54149a25
AUX libc-compat.h-fix-some-issues-arising-from-in6.h.patch 2051 SHA256 9dc049392ba3b79453baa809f0aafb47283293046b84511b5ae8519a86716048 SHA512 6d6107974dcf9671dd0f1a747160adf85a22c27216b1200ce40fd410f6fc5fd47956b8b5b51055cfda4b97cc9f172cd3850ccb4daa73e4eda449e6e77c0840ca WHIRLPOOL 4245b157fd91ecba39f42126e603a166eab74ff4abc7487639ea191de22376876de25db35b295e1227da4990e2ae04bcc6bab34a1b583ef10fda4fe30341a1c1
AUX libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch 1037 SHA256 3297454dd7bdc3417d36f448ca2091e39a6acf475e22c6eb67ee5819d7b73c8f SHA512 895e23a36d0736ff624ad960e8a26e221d990e50910cc96b1a151789f97b94288f3e801ad76d141e421901e66422c480e511b2e20798e91a15b9e298c72533d6 WHIRLPOOL 25fc05bd3d942c27e12ede60fe07953d3c35adfb7154ee1b99cc8f02946264a4f91df9c5cce089c90bb08c5aec104c6217d55c8f7c07b454f3a4c32b4ee2f61f
DIST gentoo-headers-3.16-1.tar.xz 2760 SHA256 331d2e00e94d86b6895fde450dffa7c669a177a53174649561d46ccd58e1351c SHA512 5df6857267ff93619c1735420fad689e104980ad55fb6fa33db6d4739ac166594672b16fa21b58f253540adf3198c32acf499eb3e10726c2bc88234e42e68b14 WHIRLPOOL e380f0309d391db15ad1fb273925efe30ee020c594030d5b4c74b8a3fb9154eeac658b04bc9816ba7f932f8d0cc53cf385ba02bc690a306e053a22fa167e1965
DIST gentoo-headers-3.18-1.tar.xz 3628 SHA256 d6b83a873baf83d8db535623dc9b91b52354e53238a128bb6fc29c6ff4f9f11e SHA512 89fb9b336fa3455752f6fe8626500d30245c04806890d4448a2895bbef2a5eae409940618fd4e0be57aa12784a198a695c32479f12d76450e16f2af1536e7a1f WHIRLPOOL 5a18218fef9013d5306d3ef6aa6467c1fe09dc70593c3f8f1f62a3e99d704d085420e33ded3924f0e34ee58c080952e5e007842f31d7bf648fad14a02ce3751f
+DIST gentoo-headers-4.5-1.tar.xz 6388 SHA256 7edb535fcff4d0aa02334840f7afc4049018c479e0fe81036abc5fc2b4532298 SHA512 48b19592bce8176bb6a363fb383fa4f88b3f1d30712339ba215c1246a59c9463423c53e77967039703adc5b7eb32cee532686715cc61cab95bd0694f283a76de WHIRLPOOL 57abea28dc4dc50b393ce7c1bd00d7d2e4a19a5ed24282a74065efb4d61550ac389cee45ff917d3cc56d0687172da0bfe678fb21c28758767a8b4445098fc54e
DIST gentoo-headers-base-3.16.tar.xz 3743324 SHA256 705c4652ac1bf78c9accec6fd8da795ebd88a79f6fad47cf1f4e88685bb2a2ce SHA512 100234a696f9ec3a5762a8d5115672e48ff47a1741be24affde1a1c86a906d7a560d0bd6906ec2c6cd86ec79f843f29e2cc153fff17111ddf5e2696e5ee9f7b6 WHIRLPOOL 0fb19c8618b76ebacf7a647aacdce32406384e69cbdd7126ac567cb9819781d1c85ef341822b6551962b5af0cc75372119deeb709e11f2739b99d4be7a2ab338
DIST gentoo-headers-base-3.18.tar.xz 3776668 SHA256 12a44590e505525509556f6e973464f124f172565d3a4b29a3ff4627aa24f9a7 SHA512 6615c604e5e618d26fff5a61691f7827bb05be9790db6c9f8e16e3842bce8f056f9928f85ae5714710b75743b0d0804faba4ba9c76e934e1de22dc03ef6d5535 WHIRLPOOL 5cdd500aaac3589d6672ea365f5b29ccef207db36cbc34052f0bf1bbe35b5dbfedf3b1675079c1ec05daf1a136d2da3018b2ca91bcaeda1fe8d23e3246fda25e
+DIST gentoo-headers-base-4.5.tar.xz 3915016 SHA256 cec11abb1afbe966e1e2abf828adeb7989547129147528e32bbddcac83f416fd SHA512 fee3d986d0fa25beda7b04e971810903c1a4dd50b82167a511f65cba8e6b5fdf08005578663b36841c75168e144330004561c24d827c9b4b734e08bbab4608e2 WHIRLPOOL b9272bd4e00d430a4c62a3fdd92865798c1460e59ba88a1fd28747b1ef1947c982daf915db38db061dd33e25b2dfffa2636034f6f5dc6cfe904801bb5f476cb9
EBUILD linux-headers-3.16.ebuild 1384 SHA256 9830429f282f75e51404f02d9351e34d5aa7b72a7ba5d61ef5c198c6d6cb0e02 SHA512 39bb6208c26aed1c576c6f36750bad0f22f10e30330a330f4d11f3bd1dab679ba769ba0baf88d1a60b285c11c75f520ac93c1b1029da066064a79a769d67474a WHIRLPOOL 3a39ba8e43fed7b07b0930ee7f528c6318d48ed71a87a4d81d9b68bbe1f2d3aee672d317aedd5ec75382c0524d34851ac7f0a0d76882ccd8a16a7575d3965f9f
EBUILD linux-headers-3.18-r99.ebuild 1604 SHA256 a09fa647edfa9d7116a7a98bc8f59de01bee9e2a56b98b8e40c211dc7dc04634 SHA512 3ab4ce51539eae2a285488269c4e93075aa32bfd9560f2d78158e5d681ff5785aae68f68f7b96157daeab92cee0618c414887ad5c23d70a3de25b6b3cac99f62 WHIRLPOOL 5c592a512cf765cb9d9f9e166206e1b9d14c42c94c9bf2c1b0239aa185b6bf8aaa2fef442fb6cf5dc8ba2fe515550f05939542dc3db881bfdece4cd367fca80b
+EBUILD linux-headers-4.5-r99.ebuild 1496 SHA256 f1c9c89a7c07f444bb5bd82a5fd04aae1a33daad01da1d99beb03cf8aabb7a4f SHA512 958df17d5389672931c36134c1a192f0199a81705bc06787b384a5dc72051a88f6c061a3d2b1786850669ceab4f778ffb652925d13c9b69d916e45eae2d92dc2 WHIRLPOOL 0c113ee1de2a17d9900d38d29313e42e66963198dbb4e1dfdb1e6f3a2338ef70c789a2763f8b4c021fd88b582bf4ac0419c9c171926486395b968293442a47d5
MISC metadata.xml 344 SHA256 9a1be7c7cda2e8f30ea65c0abc9b3663e8efecd6d8d383b28a55de2ff7071d10 SHA512 4dfc3a4130e5ae01c17510c693c4f2bd81fb019cf003e866c7f359213b58c6e36ed59699d6a458464e1dabd73c8f4a24eada8ced06d7ac513ec3553c0179f164 WHIRLPOOL df2e1ce9fe16c663dca50b97b9e8f3c80ada9b8feceb9381ca256a052f1c7176c56439ca61c5d734e22d04386c8efd9462758d2aa1f12d24a73425b9f1a6a6dc
diff --git a/sys-kernel/linux-headers/files/libc-4.3-portability.patch b/sys-kernel/linux-headers/files/libc-4.3-portability.patch
new file mode 100644
index 00000000..b71e4b58
--- /dev/null
+++ b/sys-kernel/linux-headers/files/libc-4.3-portability.patch
@@ -0,0 +1,120 @@
+diff -urN a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
+--- a/include/uapi/linux/if_ether.h 2015-11-02 12:36:00.000000000 -0600
++++ b/include/uapi/linux/if_ether.h 2015-11-06 21:07:36.109409947 -0600
+@@ -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
+@@ -134,12 +135,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 */
+diff -urN a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
+--- a/include/uapi/linux/kernel.h 2015-11-02 12:36:00.000000000 -0600
++++ b/include/uapi/linux/kernel.h 2015-11-06 20:59:38.595400307 -0600
+@@ -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 -urN a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
+--- a/include/uapi/linux/libc-compat.h 2015-11-02 12:36:00.000000000 -0600
++++ b/include/uapi/linux/libc-compat.h 2015-11-06 21:09:14.645411936 -0600
+@@ -48,13 +48,18 @@
+ #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. */
++#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. */
+ #if defined(_NETINET_IN_H)
+
+-/* GLIBC headers included first so don't define anything
++/* libc headers included first so don't define anything
+ * that would already be defined. */
+ #define __UAPI_DEF_IN_ADDR 0
+ #define __UAPI_DEF_IN_IPPROTO 0
+@@ -64,15 +69,7 @@
+ #define __UAPI_DEF_IN_CLASS 0
+
+ #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
+@@ -80,10 +77,10 @@
+ #define __UAPI_DEF_IN6_PKTINFO 0
+ #define __UAPI_DEF_IP6_MTUINFO 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 libc will check the
+ * __UAPI_DEF_* defines and adjust appropriately. */
+ #define __UAPI_DEF_IN_ADDR 1
+ #define __UAPI_DEF_IN_IPPROTO 1
+@@ -93,7 +90,7 @@
+ #define __UAPI_DEF_IN_CLASS 1
+
+ #define __UAPI_DEF_IN6_ADDR 1
+-/* We unconditionally define the in6_addr macros and glibc must
++/* We unconditionally define the in6_addr macros and libc must
+ * coordinate. */
+ #define __UAPI_DEF_IN6_ADDR_ALT 1
+ #define __UAPI_DEF_SOCKADDR_IN6 1
+@@ -115,7 +112,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 in.h */
+ #define __UAPI_DEF_IN_ADDR 1
+@@ -138,6 +135,6 @@
+ /* Definitions for xattr.h */
+ #define __UAPI_DEF_XATTR 1
+
+-#endif /* __GLIBC__ */
++#endif /* __KERNEL__ */
+
+ #endif /* _UAPI_LIBC_COMPAT_H */
diff --git a/sys-kernel/linux-headers/linux-headers-4.5-r99.ebuild b/sys-kernel/linux-headers/linux-headers-4.5-r99.ebuild
new file mode 100644
index 00000000..5e850462
--- /dev/null
+++ b/sys-kernel/linux-headers/linux-headers-4.5-r99.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+ETYPE="headers"
+H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 nios2 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa"
+inherit kernel-2
+detect_version
+
+PATCH_VER="1"
+SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz
+ ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}"
+
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
+
+DEPEND="app-arch/xz-utils
+ dev-lang/perl"
+RDEPEND="!!media-sound/alsa-headers"
+
+S=${WORKDIR}/gentoo-headers-base-${PV}
+
+src_unpack() {
+ unpack ${A}
+}
+
+src_prepare() {
+ [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV}
+ epatch "${FILESDIR}"/libc-4.3-portability.patch
+}
+
+src_install() {
+ kernel-2_src_install
+
+ # hrm, build system sucks
+ find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
+ find "${ED}" -depth -type d -delete 2>/dev/null
+}
+
+src_test() {
+ # Make sure no uapi/ include paths are used by accident.
+ egrep -r \
+ -e '# *include.*["<]uapi/' \
+ "${D}" && die "#include uapi/xxx detected"
+
+ einfo "Possible unescaped attribute/type usage"
+ egrep -r \
+ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \
+ -e '\<([us](8|16|32|64))\>' \
+ .
+
+ einfo "Missing linux/types.h include"
+ egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h
+
+ emake ARCH=$(tc-arch-kernel) headers_check
+}