summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-01-11 09:26:28 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-22 23:42:53 +0000
commit8fea65047519a4d84183571e09d3f3f559d9e164 (patch)
treeda2fbd9dc3f6903f9ce232af34058867e7b40ff2 /meta
parentd48ea3354eff8244e1734fa571bb52c810431b3f (diff)
downloadopenembedded-core-8fea65047519a4d84183571e09d3f3f559d9e164.tar.gz
openembedded-core-8fea65047519a4d84183571e09d3f3f559d9e164.tar.bz2
openembedded-core-8fea65047519a4d84183571e09d3f3f559d9e164.zip
bsd-headers: Package cdefs.h
Its used in several packages Signed-off-by: Khem Raj <raj.khem@gmail.com>
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"
SRC_URI = "file://sys-queue.h \
file://sys-tree.h \
+ file://sys-cdefs.h \
"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
@@ -18,6 +19,7 @@ S = "${WORKDIR}"
do_install() {
install -Dm 0644 ${S}/sys-queue.h ${D}${includedir}/sys/queue.h
install -Dm 0644 ${S}/sys-tree.h ${D}${includedir}/sys/tree.h
+ install -Dm 0644 ${S}/sys-cdefs.h ${D}${includedir}/sys/cdefs.h
}
#
# 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 @@
+#warning usage of non-standard #include <sys/cdefs.h> is deprecated
+
+#undef __P
+#undef __PMT
+
+#define __P(args) args
+#define __PMT(args) args
+
+#define __CONCAT(x,y) x ## y
+#define __STRING(x) #x
+
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS
+# define __END_DECLS
+#endif
+
+#if defined(__GNUC__) && !defined(__cplusplus)
+# define __THROW __attribute__ ((__nothrow__))
+# define __NTH(fct) __attribute__ ((__nothrow__)) fct
+#else
+# define __THROW
+# define __NTH(fct) fct
+#endif