Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 544476 | Differences between
and this patch

Collapse All | Expand All

(-)a/sys-kernel/linux-headers/Manifest (+9 lines)
Line 0 Link Here
1
AUX glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch 275 SHA256 eea3758ded887b84e3b15031e590975b4f94dbf7b03e7b135611339bcb8ca81c SHA512 8ff3af26ac01d402641d6c775ad54922a73e5eaf1e41efe842448d08c59f51ab9290104008283fafbdacd9eb1b8e48e9d2507210a8531d05a852c6ba84d2b60e WHIRLPOOL 2cd90e18615df2f1be80c83d0d2e218d6d02437b2ea91ba3a61ced407357f972371bddfed140f18ec66817e7f6ddd61a1c85da7f9b14be04f71ca3e64c8fb687
2
AUX libc-compat.h-fix-some-issues-arising-from-in6.h.patch 2051 SHA256 9dc049392ba3b79453baa809f0aafb47283293046b84511b5ae8519a86716048 SHA512 6d6107974dcf9671dd0f1a747160adf85a22c27216b1200ce40fd410f6fc5fd47956b8b5b51055cfda4b97cc9f172cd3850ccb4daa73e4eda449e6e77c0840ca WHIRLPOOL 4245b157fd91ecba39f42126e603a166eab74ff4abc7487639ea191de22376876de25db35b295e1227da4990e2ae04bcc6bab34a1b583ef10fda4fe30341a1c1
3
AUX libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch 1037 SHA256 3297454dd7bdc3417d36f448ca2091e39a6acf475e22c6eb67ee5819d7b73c8f SHA512 895e23a36d0736ff624ad960e8a26e221d990e50910cc96b1a151789f97b94288f3e801ad76d141e421901e66422c480e511b2e20798e91a15b9e298c72533d6 WHIRLPOOL 25fc05bd3d942c27e12ede60fe07953d3c35adfb7154ee1b99cc8f02946264a4f91df9c5cce089c90bb08c5aec104c6217d55c8f7c07b454f3a4c32b4ee2f61f
4
DIST gentoo-headers-3.18-1.tar.xz 3628 SHA256 d6b83a873baf83d8db535623dc9b91b52354e53238a128bb6fc29c6ff4f9f11e SHA512 89fb9b336fa3455752f6fe8626500d30245c04806890d4448a2895bbef2a5eae409940618fd4e0be57aa12784a198a695c32479f12d76450e16f2af1536e7a1f WHIRLPOOL 5a18218fef9013d5306d3ef6aa6467c1fe09dc70593c3f8f1f62a3e99d704d085420e33ded3924f0e34ee58c080952e5e007842f31d7bf648fad14a02ce3751f
5
DIST gentoo-headers-3.19-1.tar.xz 3848 SHA256 f66fedf95b99130b3b43dababe40b2269552059a945f1d9f1876f773e3fcbd82 SHA512 767de6ec1870185da2ee1fc1579289d3c564d64ae57556a8534fca9b1843cea25d4d34381d4c56959e89400b8e28aa575c56d573eace0e85e7c258a8d32f3bab WHIRLPOOL 8ae320ad44de8088e29b199c4ec80657106c413fa60b7b8158088b539a547cd5b6d33b99f0bc0acfc0567715ed0e3943b69e7cd423c4a8d096cf75d723d82c2e
6
DIST gentoo-headers-base-3.18.tar.xz 3776668 SHA256 12a44590e505525509556f6e973464f124f172565d3a4b29a3ff4627aa24f9a7 SHA512 6615c604e5e618d26fff5a61691f7827bb05be9790db6c9f8e16e3842bce8f056f9928f85ae5714710b75743b0d0804faba4ba9c76e934e1de22dc03ef6d5535 WHIRLPOOL 5cdd500aaac3589d6672ea365f5b29ccef207db36cbc34052f0bf1bbe35b5dbfedf3b1675079c1ec05daf1a136d2da3018b2ca91bcaeda1fe8d23e3246fda25e
7
DIST gentoo-headers-base-3.19.tar.xz 3807516 SHA256 e614ab947a7d0bd5064c49aeaac43507a7a322c43fdcca9a0858855137193b1d SHA512 3ba9b5e442e53d82e5af7fced55b173cacc7edc99157eb430dad81f95d48594bc18a8d5f54cd15ba2221bad4098c7732b9ba24780fc0964ea34377933ba36333 WHIRLPOOL 6ca7f201272202e6e2bc1d36c6e62e47d85163546e317fee5e4e31af98722aa6de81c4c0c54635acd4386a515f28376517aa84eec7ae4cd17220fb549e5f51c1
8
EBUILD linux-headers-3.18.ebuild 1815 SHA256 d4edb6f0c134c701c6477b11c3a5195650e3bd4cac441985320b3695e6d6f653 SHA512 5cb9d1546ca6a843853354f5ef9e20b89bc8e43d1e2f08d448508e705ebd2ced54f45acbd0f726b0312157beec9949f68648b946796afc0696f77265c5038f13 WHIRLPOOL 54958d10172395608c7bf610af742fa5d079ea531ee49d30e2b07bdb3563eaae0969fcefca29867908954fb6eb6f415f65de90c0389845084f0569f381fbe7f0
9
EBUILD linux-headers-3.19.ebuild 1823 SHA256 c8cd2af79d41538c90262229e38c828b6a9cbbf8d28611aa86d9e0639ebb6a23 SHA512 8394a75fa93966194e7f4705c3d8874a939440e5c15b0f7cae7e2fb91e8c74b17a2bc8a4d47aa22dec9d6af1e4f2d9379a9150ce24e6a9dbfc7ad46b13cf0e2e WHIRLPOOL a21c5eb2ed4d04b081eafac19d5c879071463e75325c6059185a6a56b7795756343d52aad6dd7d60a9560e5ba8077a05ef6a763c7c9df6ea727a6f5f9382a4f6
(-)a/sys-kernel/linux-headers/files/glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch (+12 lines)
Line 0 Link Here
1
--- ./include/uapi/linux/kernel.h.orig
2
+++ ./include/uapi/linux/kernel.h
3
@@ -1,7 +1,9 @@
4
 #ifndef _UAPI_LINUX_KERNEL_H
5
 #define _UAPI_LINUX_KERNEL_H
6
 
7
+#ifdef __GLIBC__
8
 #include <linux/sysinfo.h>
9
+#endif
10
 
11
 /*
12
  * 'kernel.h' contains some often-used function prototypes etc
(-)a/sys-kernel/linux-headers/files/libc-compat.h-fix-some-issues-arising-from-in6.h.patch (+61 lines)
Line 0 Link Here
1
--- ./include/uapi/linux/libc-compat.h.orig
2
+++ ./include/uapi/linux/libc-compat.h
3
@@ -48,35 +48,26 @@
4
 #ifndef _UAPI_LIBC_COMPAT_H
5
 #define _UAPI_LIBC_COMPAT_H
6
 
7
-/* We have included glibc headers... */
8
-#if defined(__GLIBC__)
9
+#ifndef __KERNEL__ /* we're used from userspace */
10
 
11
-/* Coordinate with glibc netinet/in.h header. */
12
-#if defined(_NETINET_IN_H)
13
+/* Coordinate with libc netinet/in.h header. */
14
+#ifdef _NETINET_IN_H
15
 
16
 /* GLIBC headers included first so don't define anything
17
  * that would already be defined. */
18
 #define __UAPI_DEF_IN6_ADDR		0
19
-/* The exception is the in6_addr macros which must be defined
20
- * if the glibc code didn't define them. This guard matches
21
- * the guard in glibc/inet/netinet/in.h which defines the
22
- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */
23
-#if defined(__USE_MISC) || defined (__USE_GNU)
24
 #define __UAPI_DEF_IN6_ADDR_ALT		0
25
-#else
26
-#define __UAPI_DEF_IN6_ADDR_ALT		1
27
-#endif
28
 #define __UAPI_DEF_SOCKADDR_IN6		0
29
 #define __UAPI_DEF_IPV6_MREQ		0
30
 #define __UAPI_DEF_IPPROTO_V6		0
31
 
32
-#else
33
+#else /* defined(_NETINET_IN_H) */
34
 
35
 /* Linux headers included first, and we must define everything
36
- * we need. The expectation is that glibc will check the
37
+ * we need. The expectation is that the libc will check the
38
  * __UAPI_DEF_* defines and adjust appropriately. */
39
 #define __UAPI_DEF_IN6_ADDR		1
40
-/* We unconditionally define the in6_addr macros and glibc must
41
+/* We unconditionally define the in6_addr macros and the libc must
42
  * coordinate. */
43
 #define __UAPI_DEF_IN6_ADDR_ALT		1
44
 #define __UAPI_DEF_SOCKADDR_IN6		1
45
@@ -89,7 +80,7 @@
46
 /* If we did not see any headers from any supported C libraries,
47
  * or we are being included in the kernel, then define everything
48
  * that we need. */
49
-#else /* !defined(__GLIBC__) */
50
+#else /* __KERNEL__ */
51
 
52
 /* Definitions for in6.h */
53
 #define __UAPI_DEF_IN6_ADDR		1
54
@@ -98,6 +89,6 @@
55
 #define __UAPI_DEF_IPV6_MREQ		1
56
 #define __UAPI_DEF_IPPROTO_V6		1
57
 
58
-#endif /* __GLIBC__ */
59
+#endif /* __KERNEL__ */
60
 
61
 #endif /* _UAPI_LIBC_COMPAT_H */
(-)a/sys-kernel/linux-headers/files/libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch (+39 lines)
Line 0 Link Here
1
--- ./include/uapi/linux/if_ether.h.orig
2
+++ ./include/uapi/linux/if_ether.h
3
@@ -22,6 +22,7 @@
4
 #define _UAPI_LINUX_IF_ETHER_H
5
 
6
 #include <linux/types.h>
7
+#include <linux/libc-compat.h>
8
 
9
 /*
10
  *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
11
@@ -130,11 +131,12 @@
12
  *	This is an Ethernet frame header.
13
  */
14
 
15
+#if __UAPI_DEF_ETHHDR
16
 struct ethhdr {
17
 	unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
18
 	unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
19
 	__be16		h_proto;		/* packet type ID field	*/
20
 } __attribute__((packed));
21
-
22
+#endif
23
 
24
 #endif /* _UAPI_LINUX_IF_ETHER_H */
25
--- ./include/uapi/linux/libc-compat.h.orig
26
+++ ./include/uapi/linux/libc-compat.h
27
@@ -50,6 +50,12 @@
28
 
29
 #ifndef __KERNEL__ /* we're used from userspace */
30
 
31
+#ifdef _NETINET_IF_ETHER_H /* musl */
32
+#define __UAPI_DEF_ETHHDR 0
33
+#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */
34
+#define __UAPI_DEF_ETHHDR 1
35
+#endif
36
+
37
 /* Coordinate with libc netinet/in.h header. */
38
 #ifdef _NETINET_IN_H
39
 
(-)a/sys-kernel/linux-headers/linux-headers-3.18.ebuild (+57 lines)
Line 0 Link Here
1
# Copyright 1999-2015 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-headers/linux-headers-3.18.ebuild,v 1.3 2015/03/24 20:13:13 maekke Exp $
4
5
EAPI="4"
6
7
ETYPE="headers"
8
H_SUPPORTEDARCH="alpha amd64 arc arm arm64 avr32 bfin cris frv hexagon hppa ia64 m32r m68k metag microblaze mips mn10300 openrisc ppc ppc64 s390 score sh sparc tile x86 xtensa"
9
inherit kernel-2
10
detect_version
11
12
PATCH_VER="1"
13
SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz
14
	${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}"
15
16
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
17
18
DEPEND="app-arch/xz-utils
19
	dev-lang/perl"
20
RDEPEND="!!media-sound/alsa-headers"
21
22
S=${WORKDIR}/gentoo-headers-base-${PV}
23
24
src_unpack() {
25
	unpack ${A}
26
}
27
28
src_prepare() {
29
	[[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV}
30
	epatch "${FILESDIR}"/glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
31
	epatch "${FILESDIR}"/libc-compat.h-fix-some-issues-arising-from-in6.h.patch
32
	epatch "${FILESDIR}"/libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
33
}
34
35
src_install() {
36
	kernel-2_src_install
37
38
	# hrm, build system sucks
39
	find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
40
	find "${ED}" -depth -type d -delete 2>/dev/null
41
42
	# provided by libdrm (for now?)
43
	rm -rf "${ED}"/$(kernel_header_destdir)/drm
44
}
45
46
src_test() {
47
	einfo "Possible unescaped attribute/type usage"
48
	egrep -r \
49
		-e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \
50
		-e '\<([us](8|16|32|64))\>' \
51
		.
52
53
	einfo "Missing linux/types.h include"
54
	egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h
55
56
	emake ARCH=$(tc-arch-kernel) headers_check
57
}
(-)a/sys-kernel/linux-headers/linux-headers-3.19.ebuild (-1 / +57 lines)
Line 0 Link Here
0
- 
1
# Copyright 1999-2015 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-headers/linux-headers-3.19.ebuild,v 1.1 2015/02/09 19:25:54 vapier Exp $
4
5
EAPI="4"
6
7
ETYPE="headers"
8
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"
9
inherit kernel-2
10
detect_version
11
12
PATCH_VER="1"
13
SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz
14
	${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}"
15
16
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
17
18
DEPEND="app-arch/xz-utils
19
	dev-lang/perl"
20
RDEPEND="!!media-sound/alsa-headers"
21
22
S=${WORKDIR}/gentoo-headers-base-${PV}
23
24
src_unpack() {
25
	unpack ${A}
26
}
27
28
src_prepare() {
29
	[[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV}
30
	epatch "${FILESDIR}"/glibc-specific-inclusion-of-sysinfo.h-in-kernel.h.patch
31
	epatch "${FILESDIR}"/libc-compat.h-fix-some-issues-arising-from-in6.h.patch
32
	epatch "${FILESDIR}"/libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
33
}
34
35
src_install() {
36
	kernel-2_src_install
37
38
	# hrm, build system sucks
39
	find "${ED}" '(' -name '.install' -o -name '*.cmd' ')' -delete
40
	find "${ED}" -depth -type d -delete 2>/dev/null
41
42
	# provided by libdrm (for now?)
43
	rm -rf "${ED}"/$(kernel_header_destdir)/drm
44
}
45
46
src_test() {
47
	einfo "Possible unescaped attribute/type usage"
48
	egrep -r \
49
		-e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \
50
		-e '\<([us](8|16|32|64))\>' \
51
		.
52
53
	einfo "Missing linux/types.h include"
54
	egrep -l -r -e '__[us](8|16|32|64)' "${ED}" | xargs grep -L linux/types.h
55
56
	emake ARCH=$(tc-arch-kernel) headers_check
57
}

Return to bug 544476