From 725c3d687fdcdc3d543e7d3064677d2c78f240f3 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Fri, 12 Jul 2024 13:00:39 -0700 Subject: [PATCH] dante: fix compilation with GCC14 Also added some configure fixes. Signed-off-by: Rosen Penev --- net/dante/Makefile | 2 +- net/dante/patches/010-gcc14.patch | 55 +++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 net/dante/patches/010-gcc14.patch diff --git a/net/dante/Makefile b/net/dante/Makefile index 535903c8ea..75a9307eea 100644 --- a/net/dante/Makefile +++ b/net/dante/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dante PKG_VERSION:=1.4.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.inet.no/dante/files/ diff --git a/net/dante/patches/010-gcc14.patch b/net/dante/patches/010-gcc14.patch new file mode 100644 index 0000000000..b1223dd247 --- /dev/null +++ b/net/dante/patches/010-gcc14.patch @@ -0,0 +1,55 @@ +--- a/include/osdep.h ++++ b/include/osdep.h +@@ -218,6 +218,7 @@ + #endif /* HAVE_STDDEF_H */ + + #if HAVE_PTHREAD_H ++#define _GNU_SOURCE + #include + #endif /* HAVE_PTHREAD_H */ + +--- a/lib/Rbindresvport.c ++++ b/lib/Rbindresvport.c +@@ -72,11 +72,11 @@ Rbindresvport(s, _sin) + + if (_sin == NULL) { + slog(LOG_DEBUG, "%s: fd %d, _sin = %p", function, s, _sin); +- return bindresvport(s, _sin); ++ return Rbindresvport(s, _sin); + } + + usrsockaddrcpy(&sin, TOSS(_sin), sizeof(*_sin)); +- if (bindresvport(s, TOIN(&sin)) != 0) { ++ if (Rbindresvport(s, TOIN(&sin)) != 0) { + slog(LOG_DEBUG, "%s: bindresvport(%d, %s) failed: %s", + function, + s, +--- a/lib/Rconnect.c ++++ b/lib/Rconnect.c +@@ -433,7 +433,7 @@ Rconnect(s, _name, namelen) + TOIN(&socksfd.local)->sin_port = htons(0); + + /* LINTED pointer casts may be troublesome */ +- bindresvport(s, TOIN(&socksfd.local)); ++ Rbindresvport(s, TOIN(&socksfd.local)); + } + + return Rconnect(s, TOSA(&name), namelen); +--- a/libscompat.m4 ++++ b/libscompat.m4 +@@ -34,6 +34,7 @@ AC_TRY_COMPILE([ + #include + #include + #include ++#include + #include + #include + #ifndef SIOCGIFHWADDR +@@ -103,6 +104,7 @@ AC_CHECK_FUNC(getpassphrase, + + AC_MSG_CHECKING([for sched_setaffinity]) + AC_TRY_COMPILE([ ++#define _GNU_SOURCE + #include + ], + [ cpu_set_t set1; -- 2.30.2