Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • include
  • uapi
  • linux
  • xattr.h
Find file BlameHistoryPermalink
  • Filipe Brandenburger's avatar
    xattr: fix check for simultaneous glibc header inclusion · 4c19ba5c
    Filipe Brandenburger authored Aug 29, 2014
    commit bfcfd44c upstream.
    
    The guard was introduced in commit ea1a8217
    
     ("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: default avatarFilipe Brandenburger <filbranden@google.com>
    Acked-by: default avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
    Cc: Allan McRae <allan@archlinux.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    4c19ba5c
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7