From bae30a0bf5535466c188fdc6a621cd1ee6c5c3ef Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 19 Nov 2020 15:50:57 +0100 Subject: [PATCH] file: fix gcc2 build --- sys-apps/file/file-5.39.recipe | 2 +- sys-apps/file/patches/file-5.39.patchset | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/sys-apps/file/file-5.39.recipe b/sys-apps/file/file-5.39.recipe index 27a7a15c9..38b3e79b0 100644 --- a/sys-apps/file/file-5.39.recipe +++ b/sys-apps/file/file-5.39.recipe @@ -8,7 +8,7 @@ HOMEPAGE="https://www.darwinsys.com/file/" COPYRIGHT="1986-1999 Ian F. Darwin 1994-2018 Christos Zoulas" LICENSE="BSD (2-clause)" -REVISION="1" +REVISION="2" SOURCE_URI="ftp://ftp.astron.com/pub/file/file-$portVersion.tar.gz" CHECKSUM_SHA256="f05d286a76d9556243d0cb05814929c2ecf3a5ba07963f8f70bfaaa70517fad1" PATCHES="file-$portVersion.patchset" diff --git a/sys-apps/file/patches/file-5.39.patchset b/sys-apps/file/patches/file-5.39.patchset index 797c9eae3..ee6dad573 100644 --- a/sys-apps/file/patches/file-5.39.patchset +++ b/sys-apps/file/patches/file-5.39.patchset @@ -1,4 +1,4 @@ -From 63832b804b7a09fa4a8ccd258bf904f4273430ba Mon Sep 17 00:00:00 2001 +From 9dc5da6189526e5c6370893d8035eda541cc59aa Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 12 May 2016 19:46:43 +0000 Subject: Haiku patch @@ -80,6 +80,20 @@ index 78a056b..6e74bff 100644 if (strncmp(buf, s, slen) != 0) return 0; +diff --git a/src/funcs.c b/src/funcs.c +index 09b965e..f6a64ea 100644 +--- a/src/funcs.c ++++ b/src/funcs.c +@@ -87,7 +87,8 @@ file_checkfield(char *msg, size_t mlen, const char *what, const char **pp) + protected int + file_checkfmt(char *msg, size_t mlen, const char *fmt) + { +- for (const char *p = fmt; *p; p++) { ++ const char *p; ++ for (p = fmt; *p; p++) { + if (*p != '%') + continue; + if (*++p == '%') diff --git a/src/readelf.c b/src/readelf.c index cf1dc91..8039000 100644 --- a/src/readelf.c