libesmtp: fix compilation with GCC14
authorRosen Penev <rosenp@gmail.com>
Thu, 14 Nov 2024 22:16:54 +0000 (14:16 -0800)
committerRosen Penev <rosenp@gmail.com>
Fri, 15 Nov 2024 07:55:02 +0000 (23:55 -0800)
_GNU_SOURCE is needed for some functions.

Removed now pointless libpthread depedency.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/libesmtp/Makefile
libs/libesmtp/patches/010-gcc14.patch [new file with mode: 0644]

index d4b6f6c7ff4554a88ecc8f902575ad059c8b63b3..7accb40e94bad2534cc69ab916447b22ee194dd7 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libesmtp
 PKG_VERSION:=1.1.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_MAINTAINER:=Othmar Truniger <github@truniger.ch>
 PKG_LICENSE:=LGPL-2.0-or-later
@@ -28,7 +28,7 @@ define Package/libesmtp
   CATEGORY:=Libraries
   TITLE:=A Library for Posting Electronic Mail
   URL:=https://libesmtp.github.io/
-  DEPENDS:=+libpthread +libopenssl
+  DEPENDS:=+libopenssl
 endef
 
 define Build/InstallDev
diff --git a/libs/libesmtp/patches/010-gcc14.patch b/libs/libesmtp/patches/010-gcc14.patch
new file mode 100644 (file)
index 0000000..2455c18
--- /dev/null
@@ -0,0 +1,27 @@
+--- a/smtp-api.c
++++ b/smtp-api.c
+@@ -22,6 +22,10 @@
+ #include <config.h>
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #include <stdarg.h>
+ #include <string.h>
+ #include <stdlib.h>
+--- a/smtp-tls.c
++++ b/smtp-tls.c
+@@ -47,6 +47,11 @@
+ /* This stuff doesn't belong here */
+ /* vvvvvvvvvvv */
++
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>