summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/bsd-headers/bsd-headers.bb2
-rw-r--r--meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h26
2 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-core/bsd-headers/bsd-headers.bb b/meta/recipes-core/bsd-headers/bsd-headers.bb
index ae659abec4..12a2cca2c9 100644
--- a/meta/recipes-core/bsd-headers/bsd-headers.bb
+++ b/meta/recipes-core/bsd-headers/bsd-headers.bb
@@ -7,6 +7,7 @@ SECTION = "devel"
7 7
8SRC_URI = "file://sys-queue.h \ 8SRC_URI = "file://sys-queue.h \
9 file://sys-tree.h \ 9 file://sys-tree.h \
10 file://sys-cdefs.h \
10 " 11 "
11do_configure[noexec] = "1" 12do_configure[noexec] = "1"
12do_compile[noexec] = "1" 13do_compile[noexec] = "1"
@@ -18,6 +19,7 @@ S = "${WORKDIR}"
18do_install() { 19do_install() {
19 install -Dm 0644 ${S}/sys-queue.h ${D}${includedir}/sys/queue.h 20 install -Dm 0644 ${S}/sys-queue.h ${D}${includedir}/sys/queue.h
20 install -Dm 0644 ${S}/sys-tree.h ${D}${includedir}/sys/tree.h 21 install -Dm 0644 ${S}/sys-tree.h ${D}${includedir}/sys/tree.h
22 install -Dm 0644 ${S}/sys-cdefs.h ${D}${includedir}/sys/cdefs.h
21} 23}
22# 24#
23# We will skip parsing for non-musl systems 25# We will skip parsing for non-musl systems
diff --git a/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h b/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
new file mode 100644
index 0000000000..209a623c0f
--- /dev/null
+++ b/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
@@ -0,0 +1,26 @@
1#warning usage of non-standard #include <sys/cdefs.h> is deprecated
2
3#undef __P
4#undef __PMT
5
6#define __P(args) args
7#define __PMT(args) args
8
9#define __CONCAT(x,y) x ## y
10#define __STRING(x) #x
11
12#ifdef __cplusplus
13# define __BEGIN_DECLS extern "C" {
14# define __END_DECLS }
15#else
16# define __BEGIN_DECLS
17# define __END_DECLS
18#endif
19
20#if defined(__GNUC__) && !defined(__cplusplus)
21# define __THROW __attribute__ ((__nothrow__))
22# define __NTH(fct) __attribute__ ((__nothrow__)) fct
23#else
24# define __THROW
25# define __NTH(fct) fct
26#endif