linux/include/uapi
Filipe Brandenburger a671154130 xattr: fix check for simultaneous glibc header inclusion
commit bfcfd44cce upstream.

The guard was introduced in commit ea1a8217b0 ("xattr: guard against
simultaneous glibc header inclusion") but it is using #ifdef to check
for a define that is either set to 1 or 0.  Fix it to use #if instead.

* Without this patch:

  $ { echo "#include <sys/xattr.h>"; echo "#include <linux/xattr.h>"; } | gcc -E -Iinclude/uapi - >/dev/null
  include/uapi/linux/xattr.h:19:0: warning: "XATTR_CREATE" redefined [enabled by default]
   #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
   ^
  /usr/include/x86_64-linux-gnu/sys/xattr.h:32:0: note: this is the location of the previous definition
   #define XATTR_CREATE XATTR_CREATE
   ^

* With this patch:

  $ { echo "#include <sys/xattr.h>"; echo "#include <linux/xattr.h>"; } | gcc -E -Iinclude/uapi - >/dev/null
  (no warnings)

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2014-10-05 14:52:12 -07:00
..
asm-generic asm-generic: add sched_setattr/sched_getattr syscalls 2014-02-24 11:55:20 +00:00
drm drm/tegra: Remove gratuitous pad field 2014-06-07 10:28:15 -07:00
linux xattr: fix check for simultaneous glibc header inclusion 2014-10-05 14:52:12 -07:00
mtd mtd: mtd-abi: add a helper to detect the nand type 2013-10-27 16:27:06 -07:00
rdma RDMA/uapi: Include socket.h in rdma_user_cm.h 2014-09-17 09:19:24 -07:00
scsi FCoE Updates for 3.9 2013-03-01 09:10:08 +00:00
sound ALSA: compress: Cancel the optimization of compiler and fix the size of struct for all platform. 2014-06-26 15:15:42 -04:00
video UAPI: (Scripted) Disintegrate include/video 2012-12-20 17:14:26 +00:00
xen xen: install xen/gntdev.h and xen/gntalloc.h 2014-02-11 10:12:36 -05:00
Kbuild UAPI: (Scripted) Set up UAPI Kbuild files 2012-10-02 18:01:35 +01:00