From 865b4dc2072da75b606eaf2d7be1f2ba5b26bca7 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 29 Jun 2024 16:53:32 -0700 Subject: [PATCH] libmad: backport time_t format fix Needed to fix -Wformat under 32-bit. Signed-off-by: Rosen Penev --- libs/libmad/Makefile | 2 +- libs/libmad/patches/010-format.patch | 29 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 libs/libmad/patches/010-format.patch diff --git a/libs/libmad/Makefile b/libs/libmad/Makefile index 79d66bdeb7..bdd536064b 100644 --- a/libs/libmad/Makefile +++ b/libs/libmad/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmad PKG_VERSION:=0.16.4 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=$(PKG_VERSION) diff --git a/libs/libmad/patches/010-format.patch b/libs/libmad/patches/010-format.patch new file mode 100644 index 0000000000..c1d05625ff --- /dev/null +++ b/libs/libmad/patches/010-format.patch @@ -0,0 +1,29 @@ +From cb1e56cb691e0f9ebcad595632ef484389830431 Mon Sep 17 00:00:00 2001 +From: Mangix +Date: Thu, 27 Jun 2024 20:13:07 +0000 +Subject: [PATCH] minimad: fix format under 32-bit + +This is pointer subtraction. Use proper macro for this. 32-bit needs to be %d. +--- + minimad.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/minimad.c ++++ b/minimad.c +@@ -19,6 +19,7 @@ + * $Id: minimad.c,v 1.4 2004/01/23 09:41:32 rob Exp $ + */ + ++# include + # include + # include + # include +@@ -174,7 +175,7 @@ enum mad_flow error(void *data, + { + struct buffer *buffer = data; + +- fprintf(stderr, "decoding error 0x%04x (%s) at byte offset %u\n", ++ fprintf(stderr, "decoding error 0x%04x (%s) at byte offset %" PRIdPTR "\n", + stream->error, mad_stream_errorstr(stream), + stream->this_frame - buffer->start); + -- 2.30.2