diff options
-rw-r--r-- | meta/recipes-support/attr/attr_2.4.47.bb | 4 | ||||
-rw-r--r-- | meta/recipes-support/attr/files/dont-use-decl-macros.patch | 56 |
2 files changed, 59 insertions, 1 deletions
diff --git a/meta/recipes-support/attr/attr_2.4.47.bb b/meta/recipes-support/attr/attr_2.4.47.bb index ad40c9b72a..44eee39644 100644 --- a/meta/recipes-support/attr/attr_2.4.47.bb +++ b/meta/recipes-support/attr/attr_2.4.47.bb | |||
@@ -2,7 +2,9 @@ require attr.inc | |||
2 | 2 | ||
3 | # configure.ac was missing from the release tarball. This should be fixed in | 3 | # configure.ac was missing from the release tarball. This should be fixed in |
4 | # future releases of attr, remove this when updating the recipe. | 4 | # future releases of attr, remove this when updating the recipe. |
5 | SRC_URI_append += "file://attr-Missing-configure.ac.patch" | 5 | SRC_URI_append += "file://attr-Missing-configure.ac.patch \ |
6 | file://dont-use-decl-macros.patch \ | ||
7 | " | ||
6 | 8 | ||
7 | SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7" | 9 | SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7" |
8 | SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859" | 10 | SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859" |
diff --git a/meta/recipes-support/attr/files/dont-use-decl-macros.patch b/meta/recipes-support/attr/files/dont-use-decl-macros.patch new file mode 100644 index 0000000000..9d4b8929e8 --- /dev/null +++ b/meta/recipes-support/attr/files/dont-use-decl-macros.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | Use extern "C" instead of __BEGIN_DECL/__END_DECL macros | ||
2 | these macros are defined in sys/cdefs.h for glibc and this header is not available on all libc | ||
3 | |||
4 | anyway they defined like below | ||
5 | |||
6 | #ifdef __cplusplus | ||
7 | # define __BEGIN_DECLS extern "C" { | ||
8 | # define __END_DECLS } | ||
9 | #else | ||
10 | # define __BEGIN_DECLS /* empty */ | ||
11 | # define __END_DECLS /* empty */ | ||
12 | #endif | ||
13 | |||
14 | __THROW macro is also not available on musl, defined thusly | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | |||
20 | Index: attr-2.4.47/include/xattr.h | ||
21 | =================================================================== | ||
22 | --- attr-2.4.47.orig/include/xattr.h 2014-04-02 00:01:30.252091280 -0700 | ||
23 | +++ attr-2.4.47/include/xattr.h 2014-04-02 00:12:57.985428099 -0700 | ||
24 | @@ -30,8 +30,20 @@ | ||
25 | #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ | ||
26 | #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ | ||
27 | |||
28 | - | ||
29 | -__BEGIN_DECLS | ||
30 | +#ifndef __THROW | ||
31 | +# ifndef __GNUC_PREREQ | ||
32 | +# define __GNUC_PREREQ(maj, min) (0) | ||
33 | +# endif | ||
34 | +# if defined __cplusplus && __GNUC_PREREQ (2,8) | ||
35 | +# define __THROW throw () | ||
36 | +# else | ||
37 | +# define __THROW | ||
38 | +# endif | ||
39 | +#endif | ||
40 | + | ||
41 | +#ifdef __cplusplus | ||
42 | +extern "C" { | ||
43 | +#endif | ||
44 | |||
45 | extern int setxattr (const char *__path, const char *__name, | ||
46 | const void *__value, size_t __size, int __flags) __THROW; | ||
47 | @@ -58,6 +70,8 @@ | ||
48 | extern int lremovexattr (const char *__path, const char *__name) __THROW; | ||
49 | extern int fremovexattr (int __filedes, const char *__name) __THROW; | ||
50 | |||
51 | -__END_DECLS | ||
52 | +#ifdef __cplusplus | ||
53 | +} | ||
54 | +#endif | ||
55 | |||
56 | #endif /* __XATTR_H__ */ | ||