From 6a007dcabb78d06c52be16fa2c0e698099011643 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 12 May 2024 20:18:37 -0700 Subject: [PATCH] xinetd: fix compilation with gcc 14 Missing headers. Fix some warnings related to time_t while at it. Signed-off-by: Rosen Penev --- net/xinetd/Makefile | 2 +- net/xinetd/patches/010-gcc14.patch | 64 ++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 net/xinetd/patches/010-gcc14.patch diff --git a/net/xinetd/Makefile b/net/xinetd/Makefile index be4daa649..6ab2af23f 100644 --- a/net/xinetd/Makefile +++ b/net/xinetd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xinetd PKG_VERSION:=2.3.15 -PKG_RELEASE:=15 +PKG_RELEASE:=16 PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=$(PKG_NAME)-2-3-15 diff --git a/net/xinetd/patches/010-gcc14.patch b/net/xinetd/patches/010-gcc14.patch new file mode 100644 index 000000000..71e26e61a --- /dev/null +++ b/net/xinetd/patches/010-gcc14.patch @@ -0,0 +1,64 @@ +--- a/libs/src/sio/sprint.c ++++ b/libs/src/sio/sprint.c +@@ -6,6 +6,11 @@ + + + #include "config.h" ++ ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif ++ + #include + #include + #include +--- a/xinetd/redirect.c ++++ b/xinetd/redirect.c +@@ -24,9 +24,6 @@ + #ifdef HAVE_ARPA_INET_H + #include + #endif +-#ifdef HAVE_SYS_SIGNAL_H +-#include +-#endif + + #include "redirect.h" + #include "service.h" +--- a/xinetd/sconf.c ++++ b/xinetd/sconf.c +@@ -311,7 +311,7 @@ void sc_dump( struct service_config *scp + tabprint( fd, tab_level+1, "Nice = %d\n", SC_NICE(scp) ) ; + + if ( SC_SPECIFIED( scp, A_CPS ) ) +- tabprint( fd, tab_level+1, "CPS = max conn:%lu wait:%lu\n", ++ tabprint( fd, tab_level+1, "CPS = max conn:%" PRId64 " wait:%" PRId64 "\n", + SC_TIME_CONN_MAX(scp), SC_TIME_WAIT(scp) ); + + if ( SC_SPECIFIED( scp, A_PER_SOURCE ) ) +--- a/xinetd/sensor.c ++++ b/xinetd/sensor.c +@@ -76,7 +76,7 @@ void process_sensor( const struct servic + if (SC_DENY_TIME(SVC_CONF(sp)) == -1) + strcpy(time_buf, "-1"); + else +- strx_nprint(time_buf, 38, "%ld", ++ strx_nprint(time_buf, 38, "%" PRId64, + (time_t)nowtime+(60*SC_DENY_TIME(SVC_CONF(sp)))); + + tmp = new_string(time_buf); +--- a/xinetd/util.c ++++ b/xinetd/util.c +@@ -18,11 +18,10 @@ + * The following ifdef is for TIOCNOTTY + */ + #ifndef NO_TERMIOS +-#ifdef HAVE_SYS_TERMIOS_H +-#include +-#endif + #ifdef HAVE_TERMIOS_H + #include ++#elif defined(HAVE_SYS_TERMIOS_H) ++#include + #endif + #else + #include