From 0b62d14c50a7723838a4df23c58f342dfcd3a37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Apestegu=C3=ADa?= Date: Mon, 7 Jan 2019 11:16:54 +0000 Subject: textproc/2bsd-diff: fix breakage on current On FreeBSD 13 - current, the build failed with: cc: error: unknown argument: '-i' PR: 234362 Submitted by: risner@stdio.com (maintainer) --- textproc/2bsd-diff/files/patch-diff.c | 49 ++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 4 deletions(-) (limited to 'textproc/2bsd-diff/files/patch-diff.c') diff --git a/textproc/2bsd-diff/files/patch-diff.c b/textproc/2bsd-diff/files/patch-diff.c index 6be748081b3d..75101455b3f4 100644 --- a/textproc/2bsd-diff/files/patch-diff.c +++ b/textproc/2bsd-diff/files/patch-diff.c @@ -1,6 +1,31 @@ ---- diff.c.orig Wed Nov 13 05:31:26 1991 -+++ diff.c Wed Mar 19 01:31:23 2003 -@@ -176,9 +176,10 @@ +--- diff.c.orig 1991-11-12 20:31:26 UTC ++++ diff.c +@@ -11,7 +11,7 @@ char diff[] = DIFF; + char diffh[] = DIFFH; + char pr[] = PR; + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +@@ -162,23 +162,24 @@ savestr(cp) + return (dp); + } + +-min(a,b) ++int min(a,b) + int a,b; + { + + return (a < b ? a : b); + } + +-max(a,b) ++int max(a,b) + int a,b; + { + return (a > b ? a : b); } @@ -12,7 +37,15 @@ unlink(tempfile); exit(status); } -@@ -198,7 +199,6 @@ +@@ -191,6 +192,7 @@ talloc(n) + if ((p = malloc((unsigned)n)) != NULL) + return(p); + noroom(); ++ return NULL; + } + + char * +@@ -198,14 +200,13 @@ ralloc(p,n) char *p; { register char *q; @@ -20,3 +53,11 @@ if ((q = realloc(p, (unsigned)n)) == NULL) noroom(); + return(q); + } + +-noroom() ++void noroom() + { + fprintf(stderr, "diff: files too big, try -h\n"); + done(); -- cgit v1.2.3