summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch11
-rw-r--r--mail-filter/libmilter/libmilter-1.0.2_p1.ebuild6
2 files changed, 17 insertions, 0 deletions
diff --git a/mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch b/mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch
new file mode 100644
index 000000000000..6dc4ac63105e
--- /dev/null
+++ b/mail-filter/libmilter/files/libmilter-musl-disable-cdefs.patch
@@ -0,0 +1,11 @@
+--- a/include/sm/os/sm_os_linux.h 2020-06-09 11:57:46.789786561 +0200
++++ b/include/sm/os/sm_os_linux.h 2020-06-09 11:57:49.174781812 +0200
+@@ -33,7 +33,7 @@
+ # endif /* LINUX_VERSION_CODE */
+ #endif /* SM_CONF_SHM */
+
+-#define SM_CONF_SYS_CDEFS_H 1
++#define SM_CONF_SYS_CDEFS_H 0
+ #ifndef SM_CONF_SEM
+ # define SM_CONF_SEM 2
+ #endif /* SM_CONF_SEM */
diff --git a/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild b/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild
index f2d436b1e73d..e197eb05925d 100644
--- a/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild
+++ b/mail-filter/libmilter/libmilter-1.0.2_p1.ebuild
@@ -42,6 +42,12 @@ src_prepare() {
use ipv6 && ENVDEF="${ENVDEF} -DNETINET6"
use poll && ENVDEF="${ENVDEF} -DSM_CONF_POLL=1"
+ if use elibc_musl; then
+ use ipv6 && ENVDEF="${ENVDEF} -DNEEDSGETIPNODE"
+
+ eapply "${FILESDIR}/${PN}-musl-disable-cdefs.patch"
+ fi
+
sed -e "s|@@CFLAGS@@|${CFLAGS}|" \
-e "s:@@LDFLAGS@@:${LDFLAGS}:" \
-e "s:@@CC@@:${CC}:" \