diff --git a/kernel.spec b/kernel.spec index 327866e6b..f04da4ac4 100644 --- a/kernel.spec +++ b/kernel.spec @@ -62,7 +62,7 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 1 +%global baserelease 2 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -762,6 +762,7 @@ Patch22067: selinux-Fix-sel_netnode_insert-suspicious-rcu-dereference.patch # Build patch, should go away Patch22070: irqnr-build.patch +Patch22071: uapi-prefix-fix.patch # END OF PATCH DEFINITIONS @@ -1468,6 +1469,7 @@ ApplyPatch selinux-Fix-sel_netnode_insert-suspicious-rcu-dereference.patch #Build patch, should go away ApplyPatch irqnr-build.patch +ApplyPatch uapi-prefix-fix.patch # END OF PATCH APPLICATIONS @@ -2324,6 +2326,9 @@ fi # ||----w | # || || %changelog +* Tue Nov 13 2012 Josh Boyer +- Add patch from David Howells to fix header guards on installed kernel headers + * Tue Nov 13 2012 Josh Boyer - 3.7.0-0.rc5.git1.1 - Linux v3.7-rc5-14-g9924a19 - Reenable debugging options. diff --git a/uapi-prefix-fix.patch b/uapi-prefix-fix.patch new file mode 100644 index 000000000..8b95d2a0b --- /dev/null +++ b/uapi-prefix-fix.patch @@ -0,0 +1,68 @@ +Return-Path: dhowells@redhat.com +Received: from zmta05.collab.prod.int.phx2.redhat.com (LHLO + zmta05.collab.prod.int.phx2.redhat.com) (10.5.81.12) by + zmail13.collab.prod.int.phx2.redhat.com with LMTP; Tue, 13 Nov 2012 + 09:26:44 -0500 (EST) +Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) + by zmta05.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 6E2CFF268E; + Tue, 13 Nov 2012 09:26:44 -0500 (EST) +Received: from warthog.procyon.org.uk (ovpn-113-117.phx2.redhat.com [10.3.113.117]) + by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qADEQgUu016945; + Tue, 13 Nov 2012 09:26:42 -0500 +Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley + Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United + Kingdom. + Registered in England and Wales under Company Registration No. 3798903 +Subject: [PATCH] UAPI: Strip the _UAPI prefix from header guards during + header installation +To: torvalds@osdl.org +From: David Howells +Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, + Tomasz Torcz , Josh Boyer +Date: Tue, 13 Nov 2012 14:26:41 +0000 +Message-ID: <20121113142641.16744.72039.stgit@warthog.procyon.org.uk> +User-Agent: StGit/0.16 +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 7bit +X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 +Content-Length: 1691 +Lines: 37 + +Strip the _UAPI prefix from header guards during header installation so that +any userspace dependencies aren't affected. glibc, for example, checks for +linux/types.h, linux/kernel.h, linux/compiler.h and linux/list.h by their +guards - though the last two aren't actually exported. + + libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -Wall -Werror -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fstack-protector -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c child.c -fPIC -DPIC -o .libs/child.o + In file included from cli.c:20:0: + common.h:152:8: error: redefinition of 'struct sysinfo' + In file included from /usr/include/linux/kernel.h:4:0, + from /usr/include/linux/sysctl.h:25, + from /usr/include/sys/sysctl.h:43, + from common.h:50, + from cli.c:20: + /usr/include/linux/sysinfo.h:7:8: note: originally defined here + +Reported-by: Tomasz Torcz +Signed-off-by: David Howells +Acked-by: Josh Boyer +--- + + 0 files changed + +diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl +index 239d22d..6c353ae 100644 +--- a/scripts/headers_install.pl ++++ b/scripts/headers_install.pl +@@ -42,6 +42,9 @@ foreach my $filename (@files) { + $line =~ s/(^|\s)(inline)\b/$1__$2__/g; + $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; + $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; ++ $line =~ s/#ifndef _UAPI/#ifndef /; ++ $line =~ s/#define _UAPI/#define /; ++ $line =~ s!#endif /[*] _UAPI!#endif /* !; + printf {$out} "%s", $line; + } + close $out; +