libesmtp: fix compilation with GCC14

_GNU_SOURCE is needed for some functions.

Removed now pointless libpthread depedency.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2024-11-14 14:16:54 -08:00
parent a3f35d79b1
commit db1552fc2b
2 changed files with 29 additions and 2 deletions

View 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

View File

@@ -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>