diff mbox series

[meta-networking] ettercap: Fix build with libcurl >= 8

Message ID 20230323180745.1344761-1-raj.khem@gmail.com
State New
Headers show
Series [meta-networking] ettercap: Fix build with libcurl >= 8 | expand

Commit Message

Khem Raj March 23, 2023, 6:07 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-the-libcurl-version-check-to-consid.patch | 38 +++++++++++++++++++
 .../ettercap/ettercap_0.8.3.1.bb              |  3 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-support/ettercap/ettercap/0001-sslstrip-Enhance-the-libcurl-version-check-to-consid.patch
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/ettercap/ettercap/0001-sslstrip-Enhance-the-libcurl-version-check-to-consid.patch b/meta-networking/recipes-support/ettercap/ettercap/0001-sslstrip-Enhance-the-libcurl-version-check-to-consid.patch
new file mode 100644
index 0000000000..82456c2f96
--- /dev/null
+++ b/meta-networking/recipes-support/ettercap/ettercap/0001-sslstrip-Enhance-the-libcurl-version-check-to-consid.patch
@@ -0,0 +1,38 @@ 
+From 40534662043b7d831d1f6c70448afa9d374a9b63 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 23 Mar 2023 10:23:14 -0700
+Subject: [PATCH] sslstrip: Enhance the libcurl version check to consider
+ version 8+
+
+Lately curl has released version 8 and hence LIBCURL_VERSION_MAJOR is
+reset to 0, current check assumes major version to be 7 at max and hence
+on systems with libcurl 8+ this check breaks and build fails
+
+Fixes
+
+TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/ettercap/0.8.3.1-r0/git/plug-ins/sslstrip/sslstrip.c:57:2: error: libcurl 7.26.0 or up is needed
+ ^
+1 error generated.
+
+Upstream-Status: Submitted [https://github.com/Ettercap/ettercap/pull/1221]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ plug-ins/sslstrip/sslstrip.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plug-ins/sslstrip/sslstrip.c b/plug-ins/sslstrip/sslstrip.c
+index 327bf58a..d9b67c8b 100644
+--- a/plug-ins/sslstrip/sslstrip.c
++++ b/plug-ins/sslstrip/sslstrip.c
+@@ -51,7 +51,7 @@
+ 
+ #include <curl/curl.h>
+ 
+-#if (LIBCURL_VERSION_MAJOR < 7) || (LIBCURL_VERSION_MINOR < 26)
++#if (LIBCURL_VERSION_MAJOR < 7) || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR < 26)
+ #error libcurl 7.26.0 or up is needed
+ #endif
+ 
+-- 
+2.40.0
+
diff --git a/meta-networking/recipes-support/ettercap/ettercap_0.8.3.1.bb b/meta-networking/recipes-support/ettercap/ettercap_0.8.3.1.bb
index b0958e6975..6c07223b31 100644
--- a/meta-networking/recipes-support/ettercap/ettercap_0.8.3.1.bb
+++ b/meta-networking/recipes-support/ettercap/ettercap_0.8.3.1.bb
@@ -20,7 +20,8 @@  DEPENDS += "ethtool \
 
 RDEPENDS:${PN} += "bash ethtool libgcc"
 
-SRC_URI = "gitsm://github.com/Ettercap/ettercap;branch=master;protocol=https"
+SRC_URI = "gitsm://github.com/Ettercap/ettercap;branch=master;protocol=https \
+           file://0001-sslstrip-Enhance-the-libcurl-version-check-to-consid.patch"
 
 SRCREV = "7281fbddb7da7478beb1d21e3cb105fff3778b31"