diff mbox series

[meta-networking,3/4] ssmtp: Fix build with musl >= 1.2.5

Message ID 20240325194825.641241-3-raj.khem@gmail.com
State New
Headers show
Series [meta-networking,1/4] net-snmp: Fix build with musl | expand

Commit Message

Khem Raj March 25, 2024, 7:48 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-include-libgen.h-for-basename.patch  | 32 +++++++++++++++++++
 .../recipes-support/ssmtp/ssmtp_2.64.bb       |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta-networking/recipes-support/ssmtp/ssmtp/0001-include-libgen.h-for-basename.patch
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/ssmtp/ssmtp/0001-include-libgen.h-for-basename.patch b/meta-networking/recipes-support/ssmtp/ssmtp/0001-include-libgen.h-for-basename.patch
new file mode 100644
index 0000000000..094ba5afa2
--- /dev/null
+++ b/meta-networking/recipes-support/ssmtp/ssmtp/0001-include-libgen.h-for-basename.patch
@@ -0,0 +1,32 @@ 
+From b48840952ec9a68363bed960e98dd6c7aaa3acec Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 25 Mar 2024 11:55:59 -0700
+Subject: [PATCH] include libgen.h for basename
+
+basename prototype has been removed from string.h from latest musl [1]
+compilers e.g. clang-18 flags the absense of prototype as error. therefore
+include libgen.h for providing it.
+
+[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ssmtp.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/ssmtp.c b/ssmtp.c
+index 0a719ac..4dedaf8 100644
+--- a/ssmtp.c
++++ b/ssmtp.c
+@@ -23,6 +23,7 @@
+ #include <signal.h>
+ #include <setjmp.h>
+ #include <string.h>
++#include <libgen.h>
+ #include <ctype.h>
+ #include <netdb.h>
+ #ifdef HAVE_SSL
+-- 
+2.44.0
+
diff --git a/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb b/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb
index 05d2bb18ff..499a79d1ed 100644
--- a/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb
+++ b/meta-networking/recipes-support/ssmtp/ssmtp_2.64.bb
@@ -8,6 +8,7 @@  SRC_URI = "${DEBIAN_MIRROR}/main/s/${BPN}/${BPN}_${PV}.orig.tar.bz2 \
            file://build-ouside_srcdir.patch \
            file://use-DESTDIR.patch \
            file://0001-ssmtp-Correct-the-null-pointer-assignment-to-char-po.patch \
+           file://0001-include-libgen.h-for-basename.patch \
            "
 
 SRC_URI[md5sum] = "65b4e0df4934a6cd08c506cabcbe584f"