summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2023-04-12 18:54:27 -0700
committerSam James <sam@gentoo.org>2023-04-14 01:27:29 +0100
commit5897af1453b6abf3f993d5b3a698c8184086b067 (patch)
treeffef83e37e22678626f388f666943e2661580504 /net-analyzer
parentapp-accessibility/flite: update patch (diff)
downloadgentoo-5897af1453b6abf3f993d5b3a698c8184086b067.tar.gz
gentoo-5897af1453b6abf3f993d5b3a698c8184086b067.tar.bz2
gentoo-5897af1453b6abf3f993d5b3a698c8184086b067.zip
net-analyzer/ettercap: Fix musl build
Closes: https://bugs.gentoo.org/897820 Upsream-PR: https://github.com/Ettercap/ettercap/pull/1220 Uptream-Commit: https://github.com/Ettercap/ettercap/commit/f03a1174ffccf9343423498fa3c65bd9090d4ce0 Signed-off-by: orbea <orbea@riseup.net> Closes: https://github.com/gentoo/gentoo/pull/30577 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/ettercap/ettercap-0.8.3.1-r3.ebuild (renamed from net-analyzer/ettercap/ettercap-0.8.3.1-r2.ebuild)1
-rw-r--r--net-analyzer/ettercap/files/ettercap-0.8.3.1-musl.patch39
2 files changed, 40 insertions, 0 deletions
diff --git a/net-analyzer/ettercap/ettercap-0.8.3.1-r2.ebuild b/net-analyzer/ettercap/ettercap-0.8.3.1-r3.ebuild
index 3583a1dd0776..26b54257f1db 100644
--- a/net-analyzer/ettercap/ettercap-0.8.3.1-r2.ebuild
+++ b/net-analyzer/ettercap/ettercap-0.8.3.1-r3.ebuild
@@ -56,6 +56,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${P}-curl-8.patch
+ "${FILESDIR}"/${P}-musl.patch #897820
)
src_prepare() {
diff --git a/net-analyzer/ettercap/files/ettercap-0.8.3.1-musl.patch b/net-analyzer/ettercap/files/ettercap-0.8.3.1-musl.patch
new file mode 100644
index 000000000000..516823ec6972
--- /dev/null
+++ b/net-analyzer/ettercap/files/ettercap-0.8.3.1-musl.patch
@@ -0,0 +1,39 @@
+Upsream-PR: https://github.com/Ettercap/ettercap/pull/1220
+Uptream-Commit: https://github.com/Ettercap/ettercap/commit/f03a1174ffccf9343423498fa3c65bd9090d4ce0
+Bug: https://bugs.gentoo.org/897820
+
+From 3ef51159d4e2cea97accb87af08943333fbefb04 Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
+Date: Fri, 3 Mar 2023 21:27:14 +0100
+Subject: [PATCH] Define _GNU_SOURCE to make sure memmem is found when musl
+ library is used. This fixes issue: #1219
+
+Thanks Sam James for the suggestion!
+---
+ include/ec.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/include/ec.h b/include/ec.h
+index fbf048111..561062c2f 100644
+--- a/include/ec.h
++++ b/include/ec.h
+@@ -21,6 +21,9 @@
+ #if !defined (__USE_GNU) /* for memmem(), strsignal(), etc etc... */
+ #define __USE_GNU
+ #endif
++#if !defined (_GNU_SOURCE) /* for memmem(), strsignal(), etc etc... on musl */
++ #define _GNU_SOURCE
++#endif
+ #ifdef OS_SOLARIS
+ #define _REENTRANT /* for strtok_r() */
+ #endif
+@@ -28,6 +31,9 @@
+ #if defined (__USE_GNU)
+ #undef __USE_GNU
+ #endif
++#if defined (_GNU_SOURCE)
++ #undef _GNU_SOURCE
++#endif
+ #include <strings.h>
+ #include <unistd.h>
+ #include <time.h>