xattr: guard against simultaneous glibc header inclusion
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 3 Apr 2014 21:48:33 +0000 (14:48 -0700)
committerJiri Slaby <jslaby@suse.cz>
Thu, 15 May 2014 07:55:38 +0000 (09:55 +0200)
commit998d9d2a12a3079dae6777286dcf548ed96afe80
tree925200587d3f892135ffb5282eeafbd1e0585f7c
parent765e8dadb8d3be09c0c880daf7f01fc7c131f6f6
xattr: guard against simultaneous glibc header inclusion

commit ea1a8217b06b41b31a2b60b0b83f75c77ef9c873 upstream.

If the glibc xattr.h header is included after the uapi header,
compilation fails due to an enum re-using a #define from the uapi
header.

Protect against this by guarding the define and enum inclusions against
each other.

(See https://lists.debian.org/debian-glibc/2014/03/msg00029.html
and https://sourceware.org/glibc/wiki/Synchronizing_Headers
for more information.)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Allan McRae <allan@archlinux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
include/uapi/linux/libc-compat.h
include/uapi/linux/xattr.h