remove C99-ism that broke the build on sparc64; patch from Ted Bullock

This commit is contained in:
stsp 2022-11-03 21:57:18 +00:00
parent 4fc6a6e569
commit dcee12d61e
2 changed files with 16 additions and 5 deletions

View File

@ -4,6 +4,7 @@ COMMENT-webd = game of trees repository fast-cgi server
V = 0.78
DISTNAME = got-${V}
REVISION = 0
PKGNAME-web = gotweb-${V}
PKGNAME-webd = gotwebd-${V}
CATEGORIES = devel
@ -40,9 +41,4 @@ PREFIX-webd = ${VARBASE}/www
TEST_TARGET = regress
FAKE_FLAGS = MANDIR=${PREFIX}/man/man CHROOT_DIR=${VARBASE}/www
.include <bsd.port.arch.mk>
.if !${PROPERTIES:Mclang}
CFLAGS += -std=gnu99
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,15 @@
remove c99-ism
Index: lib/diff_main.c
--- lib/diff_main.c.orig
+++ lib/diff_main.c
@@ -634,8 +634,9 @@ diff_result_contains_printable_chunks(struct diff_resu
{
struct diff_chunk *c;
enum diff_chunk_type t;
+ int i;
- for (int i = 0; i < result->chunks.len; i++) {
+ for (i = 0; i < result->chunks.len; i++) {
c = &result->chunks.head[i];
t = diff_chunk_type(c);
if (t == CHUNK_MINUS || t == CHUNK_PLUS)