Replacing the previous patch with an improved one which contains both changes
needed to build the package with musl.
diff -ru tcp-wrappers-7.6.q/debian/rules tcp-wrappers-7.6.q,musl/debian/rules
--- tcp-wrappers-7.6.q/debian/rules 2017-10-29 23:10:56.000000000 +0000
+++ tcp-wrappers-7.6.q,musl/debian/rules 2019-10-06 20:51:56.472000000 +0000
@@ -22,7 +22,11 @@
ifeq ($(filter-out hurd-%,$(DEB_BUILD_ARCH)),)
build_target := gnu
else
- build_target := linux
+ ifeq ($(DEB_HOST_ARCH_LIBC),musl)
+ build_target := musl
+ else
+ build_target := linux
+ endif
endif
diff -ru tcp-wrappers-7.6.q/Makefile tcp-wrappers-7.6.q,musl/Makefile
--- tcp-wrappers-7.6.q/Makefile 2019-10-06 20:53:43.000000000 +0000
+++ tcp-wrappers-7.6.q,musl/Makefile 2019-10-06 20:52:20.780000000 +0000
@@ -154,6 +154,12 @@
NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \
EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
+musl:
+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
+ LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
+ NETGROUP= TLI= VSYSLOG= BUGS= \
+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
+
gnu:
@make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
diff -ru tcp-wrappers-7.6.q/tcpd.h tcp-wrappers-7.6.q,musl/tcpd.h
--- tcp-wrappers-7.6.q/tcpd.h 2019-10-06 20:53:43.000000000 +0000
+++ tcp-wrappers-7.6.q,musl/tcpd.h 2019-10-06 20:20:16.700000000 +0000
@@ -11,7 +11,9 @@
#include <netinet/in.h>
#include <stdio.h>
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
/* Structure to describe one communications endpoint. */
@@ -252,6 +254,8 @@
extern char *my_strtok();
#endif
-__END_DECLS
+#ifdef __cplusplus
+}
+#endif
#endif