net-analyzer/ettercap: Fix CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Sat, 1 Feb 2020 00:28:52 +0000 (01:28 +0100)
committerJeroen Roovers <jer@gentoo.org>
Sat, 1 Feb 2020 00:29:54 +0000 (01:29 +0100)
Package-Manager: Portage-2.3.86, Repoman-2.3.20
Closes: https://bugs.gentoo.org/show_bug.cgi?id=707674
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
net-analyzer/ettercap/ettercap-0.8.3.ebuild
net-analyzer/ettercap/ettercap-9999.ebuild
net-analyzer/ettercap/files/ettercap-0.8.3-fno-common.patch [new file with mode: 0644]

index 5a67e97e51627a48ce066ee688b32c56fa7fffd8..f49ef8cf2e4fdd4f63917027645ce18d212b7efd 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -47,6 +47,9 @@ DEPEND="${RDEPEND}
        test? ( dev-libs/check )
        sys-devel/flex
        virtual/yacc"
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.8.3-fno-common.patch
+)
 
 src_prepare() {
        sed -i "s:Release:Release Gentoo:" CMakeLists.txt || die
index 8db7873acf3e1163498ab8c1b1aa28d08db0d3e2..047be22f8f4cfd34986563dc705917924f9c44e2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -46,6 +46,9 @@ DEPEND="${RDEPEND}
        test? ( dev-libs/check )
        sys-devel/flex
        virtual/yacc"
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.8.3-fno-common.patch
+)
 
 src_prepare() {
        sed -i "s:Release:Release Gentoo:" CMakeLists.txt || die
diff --git a/net-analyzer/ettercap/files/ettercap-0.8.3-fno-common.patch b/net-analyzer/ettercap/files/ettercap-0.8.3-fno-common.patch
new file mode 100644 (file)
index 0000000..eddca83
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/include/ec_threads.h
++++ b/include/ec_threads.h
+@@ -12,7 +12,7 @@
+ };
+ 
+ /* a value to be used to return errors in fuctcions using pthread_t values */
+-pthread_t EC_PTHREAD_NULL;
++extern pthread_t EC_PTHREAD_NULL;
+ #define EC_PTHREAD_SELF EC_PTHREAD_NULL
+ #define PTHREAD_ID(id)  (*(unsigned long*)&(id)) 
+ 
+--- a/src/ec_threads.c
++++ b/src/ec_threads.c
+@@ -46,6 +46,8 @@
+ #define INIT_LOCK     do{ DEBUG_MSG("thread_init_lock"); pthread_mutex_lock(&init_mtx); } while(0)
+ #define INIT_UNLOCK   do{ DEBUG_MSG("thread_init_unlock"); pthread_mutex_unlock(&init_mtx); } while(0)
+ 
++pthread_t EC_PTHREAD_NULL;
++
+ /* protos... */
+ 
+ pthread_t ec_thread_detached(char *name, char *desc, void *(*function)(void *), void *args, int detached);