From e08a0caab4cc30b7b98032af28dc4bbad5172ead Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Wed, 3 Jan 2024 12:59:44 +0100 Subject: tcp-wrappers: drop libnsl2 build dependency The only libnsl2 function which is used by tcp-wrappers is 'yp_get_default_domain()'. When USE_GETDOMAIN is set, this is implemented as a simple wrapper around getdomainname() so that libnsl2 is not used at all. We added a patch which does '#include ' to avoid implicit forward declaration. By conditionalizing this, the libnsl2 dependency can be dropped completely. (From OE-Core rev: b013f6ce40d315c894064cf9fa77d9c7a9dad2b0) Signed-off-by: Enrico Scholz Signed-off-by: Richard Purdie --- .../0001-Fix-implicit-function-declaration-warnings.patch | 9 +++++++-- meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb | 2 -- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'meta/recipes-extended/tcp-wrappers') diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch index ec793ac8ff..474703885d 100644 --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-implicit-function-declaration-warnings.patch @@ -20,11 +20,16 @@ diff --git a/hosts_access.c b/hosts_access.c index 0133e5e..58697ea 100644 --- a/hosts_access.c +++ b/hosts_access.c -@@ -33,6 +33,7 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22"; +@@ -33,6 +33,12 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22"; #endif #include #include -+#include ++#ifdef USE_GETDOMAIN ++/* defined in workarounds.c */ ++extern int yp_get_default_domain(char **ptr); ++#else ++# include ++#endif /* USE_GETDOMAIN */ #include #include #include 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 c655da1199..bcd1d6f792 100644 --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb @@ -7,8 +7,6 @@ SECTION = "console/network" LICENSE = "BSD-1-Clause" LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" -DEPENDS += "libnsl2" - PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" FILES:libwrap = "${base_libdir}/lib*${SOLIBS}" FILES:libwrap-doc = "${mandir}/man3 ${mandir}/man5" -- cgit v1.2.3-54-g00ecf