f95625a91310ef531da629a75cf99b9c069d629b
[openwrt/staging/hauke.git] / package / libs / elfutils / patches / 110-no-cdefs.patch
1 From e399540ab67ffe83ca3c4cb768a2f0f2f32a9057 Mon Sep 17 00:00:00 2001
2 From: Rosen Penev <rosenp@gmail.com>
3 Date: Sun, 5 Apr 2020 15:56:59 -0700
4 Subject: [PATCH] libelf: remove usage of sys/cdefs
5
6 sys/cdefs is a deprecated glibc header that is unavailable with other
7 libc implementations such as musl.
8
9 features.h under glibc includes sys/cdefs whereas it does not under musl.
10
11 Signed-off-by: Rosen Penev <rosenp@gmail.com>
12 ---
13 lib/fixedsizehash.h | 1 -
14 libelf/elf.h | 10 ++++++----
15 2 files changed, 6 insertions(+), 5 deletions(-)
16
17 --- a/lib/fixedsizehash.h
18 +++ b/lib/fixedsizehash.h
19 @@ -30,7 +30,6 @@
20 #include <errno.h>
21 #include <stdlib.h>
22 #include <string.h>
23 -#include <sys/cdefs.h>
24
25 #include <system.h>
26
27 --- a/libelf/elf.h
28 +++ b/libelf/elf.h
29 @@ -19,9 +19,9 @@
30 #ifndef _ELF_H
31 #define _ELF_H 1
32
33 -#include <features.h>
34 -
35 -__BEGIN_DECLS
36 +#ifdef __cplusplus
37 +extern "C" {
38 +#endif
39
40 /* Standard ELF types. */
41
42 @@ -4103,6 +4103,8 @@ enum
43 #define R_ARC_TLS_LE_S9 0x4a
44 #define R_ARC_TLS_LE_32 0x4b
45
46 -__END_DECLS
47 +#ifdef __cplusplus
48 +}
49 +#endif
50
51 #endif /* elf.h */