0
0
mirror of https://github.com/openwrt/packages.git synced 2025-07-26 23:12:29 +00:00
Files
packages/libs/libmad/patches/010-format.patch
Rosen Penev 865b4dc207 libmad: backport time_t format fix
Needed to fix -Wformat under 32-bit.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-07-12 13:15:49 -07:00

30 lines
880 B
Diff

From cb1e56cb691e0f9ebcad595632ef484389830431 Mon Sep 17 00:00:00 2001
From: Mangix <mangixjohn@icloud.com>
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 <inttypes.h>
# include <stdio.h>
# include <unistd.h>
# include <sys/stat.h>
@@ -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);