Attempt to fix build on amd64 by using va_copy

This commit is contained in:
Tilman Keskinoz 2004-04-13 17:09:32 +00:00
parent 13186f5168
commit 60b9c718e3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=106923
2 changed files with 15 additions and 4 deletions

View file

@ -23,10 +23,6 @@ INSTALLS_SHLIB= yes
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${ARCH} == "amd64"
BROKEN= "Does not compile on amd64"
.endif
.include "${FILESDIR}/manpages.mk" .include "${FILESDIR}/manpages.mk"
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -0,0 +1,15 @@
--- l2_ut_format.c.orig Tue Apr 13 19:04:15 2004
+++ l2_ut_format.c Tue Apr 13 19:05:59 2004
@@ -1131,8 +1131,11 @@
va_list apbak;
char *s;
int rv;
-
+#ifdef __amd64__
+ va_copy(apbak,ap);
+#else
apbak = ap;
+#endif
if ((rv = l2_util_vsprintf(NULL, -1, fmt, ap)) == -1)
return NULL;
if ((s = malloc(rv+1)) == NULL)