aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2022-01-30 22:53:30 -0800
committerRosen Penev <rosenp@gmail.com>2022-01-30 23:27:41 -0800
commitd438d1295c9b459e0c2cdfdfd602d4f089e4c374 (patch)
treed3d4dfb0e0b0edc0dd363839f44a57ac39deb4b1
parentae7b15872341786773b3eb4419b4af490c6af773 (diff)
xinetd: fix bad printf formats
Easier to use the proper C macro. Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r--net/xinetd/Makefile2
-rw-r--r--net/xinetd/patches/005-format.patch23
2 files changed, 24 insertions, 1 deletions
diff --git a/net/xinetd/Makefile b/net/xinetd/Makefile
index 99b576121..62e90bdde 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:=12
+PKG_RELEASE:=13
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/xinetd-org/xinetd/archive
diff --git a/net/xinetd/patches/005-format.patch b/net/xinetd/patches/005-format.patch
new file mode 100644
index 000000000..30700c85b
--- /dev/null
+++ b/net/xinetd/patches/005-format.patch
@@ -0,0 +1,23 @@
+--- a/xinetd/connection.c
++++ b/xinetd/connection.c
+@@ -14,6 +14,7 @@
+ #include <syslog.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <inttypes.h>
+
+ #include <netinet/tcp.h>
+
+@@ -218,11 +219,7 @@ void conn_dump( const connection_s *cp,
+
+ tabprint( fd, 1, "service = %s\n", SVC_ID( cp->co_sp ) ) ;
+ tabprint( fd, 1, "descriptor = %d\n", cp->co_descriptor ) ;
+-#if defined(__GNUC__) && !defined(__arch64__) && !defined(__alpha__)
+- tabprint( fd, 1, "flags = %#llx\n", cp->co_flags ) ;
+-#else
+- tabprint( fd, 1, "flags = %#lx\n", cp->co_flags ) ;
+-#endif
++ tabprint( fd, 1, "flags = %#" PRIx64 "\n", cp->co_flags ) ;
+ tabprint( fd, 1, "remote_address = %s,%d\n", name,
+ ntohs( cp->co_remote_address.sa_in.sin_port ) ) ;
+ }