mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
file: fix gcc2 build
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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 <jerome.duval@gmail.com>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user