Import a patch from git mailing list to fix build with gcc 4.2.1 and

remove dependency of newer gcc to build it on 9.x

Obtained from:	http://thread.gmane.org/gmane.comp.version-control.git/289397
MFH:		2016Q1
This commit is contained in:
Renato Botelho 2016-03-21 10:50:29 +00:00
parent 42ccace4e1
commit 45aff9f96b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=411551
2 changed files with 14 additions and 4 deletions

View file

@ -3,6 +3,7 @@
PORTNAME= git
DISTVERSION= 2.7.4
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= KERNEL_ORG/software/scm/git
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
@ -97,10 +98,6 @@ CVS_RUN_DEPENDS= cvsps:${PORTSDIR}/devel/cvsps
.include <bsd.port.options.mk>
.if ${OSVERSION} < 1000000
USE_GCC= 4.8+
.endif
# This is intentionally not exposed as an option.
.ifndef (WITH_DEBUG)
ALL_TARGET= all strip

View file

@ -0,0 +1,13 @@
--- git-compat-util.h.orig 2016-03-21 10:34:43 UTC
+++ git-compat-util.h
@@ -715,8 +715,8 @@ static inline size_t st_add(size_t a, si
(uintmax_t)a, (uintmax_t)b);
return a + b;
}
-#define st_add3(a,b,c) st_add((a),st_add((b),(c)))
-#define st_add4(a,b,c,d) st_add((a),st_add3((b),(c),(d)))
+#define st_add3(a,b,c) st_add(st_add((a),(b)),(c))
+#define st_add4(a,b,c,d) st_add(st_add3((a),(b),(c)),(d))
static inline size_t st_mult(size_t a, size_t b)
{