]> git.pld-linux.org Git - packages/ettercap.git/commitdiff
- added no-common patch from Fedora
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 23 May 2020 20:20:21 +0000 (22:20 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 23 May 2020 20:20:21 +0000 (22:20 +0200)
ettercap-no-common.patch [new file with mode: 0644]
ettercap.spec

diff --git a/ettercap-no-common.patch b/ettercap-no-common.patch
new file mode 100644 (file)
index 0000000..f1ec3be
--- /dev/null
@@ -0,0 +1,77 @@
+From 2168090f5b023573ebea0f83574950401ed5d67b Mon Sep 17 00:00:00 2001
+From: Alexander Koeppe <format_c@online.de>
+Date: Wed, 29 Jan 2020 21:09:31 +0100
+Subject: [PATCH] define EC_PTHREAD_NULL as global heap variable
+
+---
+ include/ec_globals.h | 7 +++++++
+ include/ec_threads.h | 2 +-
+ src/ec_globals.c     | 3 +++
+ 3 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/include/ec_globals.h b/include/ec_globals.h
+index 5033f5dc0..45e12514c 100644
+--- a/include/ec_globals.h
++++ b/include/ec_globals.h
+@@ -176,6 +176,11 @@ struct wifi_env {
+       size_t wkey_len;
+ };
++/* threads structure */
++struct thread_env {
++   pthread_t ec_pthread_null;
++};
++
+ /* the globals container */
+ struct ec_globals {
+    struct ec_conf *conf;
+@@ -191,6 +196,7 @@ struct ec_globals {
+    struct target_env *t1;
+    struct target_env *t2;
+    struct wifi_env *wifi;
++   struct thread_env *thread;
+    LIST_HEAD(, hosts_list) hosts_list;
+    TAILQ_HEAD(gbl_ptail, host_profile) profiles_list_head;
+    struct filter_list *filters;
+@@ -213,6 +219,7 @@ EC_API_EXTERN struct ec_globals *ec_gbls;
+ #define EC_GBL_TARGET1        (EC_GBLS->t1)
+ #define EC_GBL_TARGET2        (EC_GBLS->t2)
+ #define EC_GBL_WIFI           (EC_GBLS->wifi)
++#define EC_GBL_THREAD         (EC_GBLS->thread)
+ #define EC_GBL_HOSTLIST       (EC_GBLS->hosts_list)
+ #define EC_GBL_PROFILES       (EC_GBLS->profiles_list_head)
+ #define EC_GBL_FILTERS        &(EC_GBLS->filters)
+diff --git a/include/ec_threads.h b/include/ec_threads.h
+index 6cd2c1084..f63f3ee3a 100644
+--- a/include/ec_threads.h
++++ b/include/ec_threads.h
+@@ -12,7 +12,7 @@ struct ec_thread {
+ };
+ /* a value to be used to return errors in fuctcions using pthread_t values */
+-pthread_t EC_PTHREAD_NULL;
++#define EC_PTHREAD_NULL EC_GBL_THREAD->ec_pthread_null
+ #define EC_PTHREAD_SELF EC_PTHREAD_NULL
+ #define PTHREAD_ID(id)  (*(unsigned long*)&(id)) 
+diff --git a/src/ec_globals.c b/src/ec_globals.c
+index 1bc313c15..e45dba5cf 100644
+--- a/src/ec_globals.c
++++ b/src/ec_globals.c
+@@ -52,6 +52,7 @@ void ec_globals_alloc(void)
+    SAFE_CALLOC(ec_gbls->t1, 1, sizeof(struct target_env));
+    SAFE_CALLOC(ec_gbls->t2, 1, sizeof(struct target_env));
+    SAFE_CALLOC(ec_gbls->wifi, 1, sizeof(struct wifi_env));
++   SAFE_CALLOC(ec_gbls->thread, 1, sizeof(struct thread_env));
+    /* filter list entries are allocated as needed */
+    ec_gbls->filters = NULL;
+@@ -72,6 +73,8 @@ void ec_globals_free(void)
+    EC_GBL_FREE(ec_gbls->bridge);
+    EC_GBL_FREE(ec_gbls->sm);
+    EC_GBL_FREE(ec_gbls->filters);
++   EC_GBL_FREE(ec_gbls->wifi);
++   EC_GBL_FREE(ec_gbls->thread);
+    free_ip_list(ec_gbls->t1);
+    EC_GBL_FREE(ec_gbls->t1);
index e1ea4b33aa71daf1a7e511842988ff0c2cced265..2b35fe2ff979e4fcaf1f6c3534861f587dfdab59 100644 (file)
@@ -20,6 +20,7 @@ Source0:      https://github.com/Ettercap/ettercap/releases/download/v%{version}/%{na
 Patch0:                %{name}-buildtype.patch
 Patch1:                %{name}-gtk3.patch
 Patch2:                %{name}-link.patch
+Patch3:                %{name}-no-common.patch
 URL:           https://www.ettercap-project.org/
 %{?with_geoip:BuildRequires:   GeoIP-devel}
 BuildRequires: bison
@@ -98,6 +99,7 @@ hosts na rede local, portas abertas, versão de serviços, tipo de host
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 install -d build
This page took 0.043257 seconds and 4 git commands to generate.