From 020a71e48d1d424dd9c0855f1b8997c64f5cd02d Mon Sep 17 00:00:00 2001 From: arved Date: Tue, 13 Apr 2004 17:42:20 +0000 Subject: Attempt to fix build on amd64 by using va_copy --- devel/str/Makefile | 4 ---- devel/str/files/patch-str_basic.c | 14 ++++++++++++++ devel/str/files/patch-ts.c | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 devel/str/files/patch-str_basic.c create mode 100644 devel/str/files/patch-ts.c (limited to 'devel/str') diff --git a/devel/str/Makefile b/devel/str/Makefile index c85032387cfa..e302d170af14 100644 --- a/devel/str/Makefile +++ b/devel/str/Makefile @@ -22,10 +22,6 @@ MAN3= str.3 .include -.if ${ARCH} == "amd64" -BROKEN= "Does not compile on amd64" -.endif - post-build: @${ECHO_MSG} "===> Use 'make test' to run a quick test suite." diff --git a/devel/str/files/patch-str_basic.c b/devel/str/files/patch-str_basic.c new file mode 100644 index 000000000000..88d8b0c8e584 --- /dev/null +++ b/devel/str/files/patch-str_basic.c @@ -0,0 +1,14 @@ +--- str_basic.c.orig Tue Apr 13 19:28:46 2004 ++++ str_basic.c Tue Apr 13 19:29:51 2004 +@@ -133,7 +133,11 @@ + return NULL; + + /* determine required target string length */ ++#ifdef __amd64__ ++ va_copy(ap_safe, ap); ++#else + ap_safe = ap; ++#endif + n = str_len(s); + while ((cp = va_arg(ap, char *)) != NULL) + n += str_len(cp); diff --git a/devel/str/files/patch-ts.c b/devel/str/files/patch-ts.c new file mode 100644 index 000000000000..8f9695746cf9 --- /dev/null +++ b/devel/str/files/patch-ts.c @@ -0,0 +1,14 @@ +--- ts.c.orig Tue Apr 13 19:32:20 2004 ++++ ts.c Tue Apr 13 19:32:46 2004 +@@ -206,7 +206,11 @@ + + if (format == NULL) + return NULL; ++#ifdef __amd64__ ++ va_copy(ap2,ap); ++#else + ap2 = ap; ++#endif + if ((n = ts_suite_mvxprintf(NULL, 0, format, ap)) == -1) + return NULL; + if ((buffer = (char *)malloc(n+1)) == NULL) -- cgit