wok-4.x view glibc/stuff/glibc-2.19-xattr_header.patch @ rev 12466

New toolchain GCC 4.9.2, Glibc 2.19, Binutils 2.23.1
author Stanislas Leduc <shann@slitaz.org>
date Wed Nov 09 15:12:00 2022 +0000 (18 months ago)
parents
children
line source
1 From: Serge Hallyn <serge.hallyn@ubuntu.com>
2 Date: Tue, 11 Mar 2014 04:17:07 +0000 (-0500)
3 Subject: misc/sys/xattr.h: guard against linux uapi header inclusion
4 X-Git-Url: https://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=fdbe8eae;hp=fede7a5ffa188c22c3789135bd5cf82e487dd3d0
6 misc/sys/xattr.h: guard against linux uapi header inclusion
8 If the glibc xattr.h header is included after the uapi header,
9 compilation fails due to an enum re-using a #define from the
10 uapi header. Protect against this by guarding the define and
11 enum inclusions against each other.
13 (A corresponding kernel patch has been sent here:
14 http://lkml.org/lkml/2014/3/7/331 )
16 (See https://lists.debian.org/debian-glibc/2014/03/msg00029.html
17 and https://sourceware.org/glibc/wiki/Synchronizing_Headers
18 for more information.)
20 Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
21 ---
23 diff --git a/misc/sys/xattr.h b/misc/sys/xattr.h
24 index 929cd87..796df90 100644
25 --- a/misc/sys/xattr.h
26 +++ b/misc/sys/xattr.h
27 @@ -26,6 +26,7 @@ __BEGIN_DECLS
29 /* The following constants should be used for the fifth parameter of
30 `*setxattr'. */
31 +#ifndef __USE_KERNEL_XATTR_DEFS
32 enum
33 {
34 XATTR_CREATE = 1, /* set value, fail if attr already exists. */
35 @@ -33,6 +34,7 @@ enum
36 XATTR_REPLACE = 2 /* set value, fail if attr does not exist. */
37 #define XATTR_REPLACE XATTR_REPLACE
38 };
39 +#endif
41 /* Set the attribute NAME of the file pointed to by PATH to VALUE (which
42 is SIZE bytes long). Return 0 on success, -1 for errors. */