On Wed, Nov 7, 2012 at 12:21 PM, David Howells <dhowells@xxxxxxxxxx> wrote: > David Howells <dhowells@xxxxxxxxxx> wrote: > >> A better way to do this might be to make the header installation discard the >> "_UAPI" prefix that got added. > > As the attached patch. > > David > --- > commit 75a88e14a97d239a47cbd0fc55fc23416007d733 > Author: David Howells <dhowells@xxxxxxxxxx> > Date: Wed Nov 7 17:14:14 2012 +0000 > > UAPI: Strip the _UAPI prefix from header guards during header installation > > 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 - though the > last two aren't actually exported. > > Signed-off-by: David Howells <dhowells@xxxxxxxxxx> I tested this locally by applying this to the latest 3.7 tree and doing make headers_install pointing to a throw-away dir. When comparing the headers installed there with those from a 3.6 kernel installed in /usr, there were no differences in the include guards. That seems to produce the consistent results we'd want. So: Acked-by: Josh Boyer <jwboyer@xxxxxxxxxx> josh > > 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; -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel