bsd-headers: Package cdefs.h

Its used in several packages

(From OE-Core rev: 8fea65047519a4d84183571e09d3f3f559d9e164)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj 2016-01-11 09:26:28 +00:00 committed by Richard Purdie
parent 29deaf0a40
commit 2df08b8a89
2 changed files with 28 additions and 0 deletions

View File

@ -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

View File

@ -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