From 6e3950b4505e052ada54776109061d001496b0b4 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 14 Dec 2015 00:15:47 +0000 Subject: tcp-wrappers: Fix build with musl (From OE-Core rev: 27459f5e4a9b86b0cd751f6ec3b92071e4316cc0) Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- .../tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch | 31 ++++++++++++++++++++++ .../tcp-wrappers/tcp-wrappers_7.6.bb | 4 +++ 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch (limited to 'meta/recipes-extended') diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch new file mode 100644 index 0000000000..eee640e8a8 --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch @@ -0,0 +1,31 @@ +__BEGIN_DECLS/__END_DECLS are BSD specific and not defined in musl +glibc and uclibc had sys/cdefs.h doing it. + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +Index: tcp_wrappers_7.6/tcpd.h +=================================================================== +--- tcp_wrappers_7.6.orig/tcpd.h ++++ tcp_wrappers_7.6/tcpd.h +@@ -11,7 +11,9 @@ + #include + #include + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /* Structure to describe one communications endpoint. */ + +@@ -252,6 +254,8 @@ extern char *fix_strtok(); + extern char *my_strtok(); + #endif + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb index 2630478284..5fdbbced72 100644 --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb @@ -43,6 +43,7 @@ SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ file://try-from.8 \ file://safe_finger.8 \ file://makefile-fix-parallel.patch \ + file://musl-decls.patch \ " SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a" @@ -73,6 +74,9 @@ EXTRA_OEMAKE = "'CC=${CC}' \ EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN" EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN" +EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN" + +EXTRA_OEMAKE_append_libc-musl = " 'LIBS='" do_compile () { oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \ -- cgit v1.2.3-54-g00ecf