Skip to content

Commit

Permalink
Merge pull request #17748 from neheb/8
Browse files Browse the repository at this point in the history
xinetd: fix bad printf formats
  • Loading branch information
feckert authored Feb 3, 2022
2 parents 951a74f + d438d12 commit cb47197
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion net/xinetd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions net/xinetd/patches/005-format.patch
Original file line number Diff line number Diff line change
@@ -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 ) ) ;
}

0 comments on commit cb47197

Please sign in to comment.