From bde86a6cba7ea2c9f01f13a9fdd0a9b7d1b4512e Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 30 Jan 2022 23:19:58 -0800 Subject: [PATCH] mktorrent: fix bad format for 64bit platforms The Makefile tries and fails to run a binary that sets it properly. Just hardcode it. Signed-off-by: Rosen Penev --- utils/mktorrent/Makefile | 2 +- utils/mktorrent/patches/010-format.patch | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 utils/mktorrent/patches/010-format.patch diff --git a/utils/mktorrent/Makefile b/utils/mktorrent/Makefile index 3bc241a617..4afbba4b75 100644 --- a/utils/mktorrent/Makefile +++ b/utils/mktorrent/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mktorrent PKG_VERSION:=1.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz diff --git a/utils/mktorrent/patches/010-format.patch b/utils/mktorrent/patches/010-format.patch new file mode 100644 index 0000000000..e7f62b04fe --- /dev/null +++ b/utils/mktorrent/patches/010-format.patch @@ -0,0 +1,20 @@ +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -61,6 +61,6 @@ OBJS = $(SRCS:.c=.o) + all: $(program) + + %.o: %.c $(HEADERS) prefix +- $(CC) $(CFLAGS) $(DEFINES) -DPRIoff="\"$(OFFPRFX)d\"" -DVERSION="\"$(version)\"" -c $< ++ $(CC) $(CFLAGS) $(DEFINES) -DPRIoff="PRId64 \"d\"" -DVERSION="\"$(version)\"" -c $< + + include rules.mk +--- a/init.c ++++ b/init.c +@@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fi + #include /* the stat structure */ + #include /* getopt(), getcwd(), sysconf() */ + #include /* strcmp(), strlen(), strncpy() */ ++#include + #ifdef USE_LONG_OPTIONS + #include /* getopt_long() */ + #endif -- 2.30.2