git: 27ff8d373e4d - main - shells/ast-ksh: fix build on powerpc64*
Piotr Kubaj
pkubaj at FreeBSD.org
Mon Apr 26 15:24:32 UTC 2021
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=27ff8d373e4d1ed2e6a049015109d23171e4bc1d
commit 27ff8d373e4d1ed2e6a049015109d23171e4bc1d
Author: Piotr Kubaj <pkubaj at FreeBSD.org>
AuthorDate: 2021-04-26 15:24:28 +0000
Commit: Piotr Kubaj <pkubaj at FreeBSD.org>
CommitDate: 2021-04-26 15:24:28 +0000
shells/ast-ksh: fix build on powerpc64*
Bring back patches committed as part of r346423 to fix build issue:
/wrkdirs/usr/ports/shells/ast-ksh/work/ast-ksh93v/src/lib/libast/hash/hashalloc.c:162:4: error: non-const lvalue reference to type '__builtin_va_list' cannot bind to a temporary of type 'va_list' (aka 'char *')
va_copy(ap, va_listval(va_arg(ap, va_listarg)));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/_stdarg.h:49:32: note: expanded from macro 'va_copy'
#define va_copy(dest, src) __va_copy(dest, src)
^~~~~~~~~~~~~~~~~~~~
/usr/include/sys/_stdarg.h:47:58: note: expanded from macro '__va_copy'
#define __va_copy(dest, src) __builtin_va_copy((dest), (src))
^~~~~
1 error generated.
PR: 255308
Approved by: saper at saper.info (maintainer)
---
.../files/patch-src_lib_libast_hash_hashalloc.c | 20 ++++++++++++++++++++
.../files/patch-src_lib_libast_string_tokscan.c | 20 ++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/shells/ast-ksh/files/patch-src_lib_libast_hash_hashalloc.c b/shells/ast-ksh/files/patch-src_lib_libast_hash_hashalloc.c
new file mode 100644
index 000000000000..728e727803c4
--- /dev/null
+++ b/shells/ast-ksh/files/patch-src_lib_libast_hash_hashalloc.c
@@ -0,0 +1,20 @@
+--- src/lib/libast/hash/hashalloc.c.orig 2021-04-21 15:44:15 UTC
++++ src/lib/libast/hash/hashalloc.c
+@@ -49,6 +49,7 @@ hashalloc(Hash_table_t* ref, ...)
+ va_list* vp = va;
+ Hash_region_f region = 0;
+ void* handle;
++ va_listarg tmpval;
+
+ va_start(ap, ref);
+
+@@ -159,7 +160,8 @@ hashalloc(Hash_table_t* ref, ...)
+ va_copy(ap, np);
+ }
+ #else
+- va_copy(ap, va_listval(va_arg(ap, va_listarg)));
++ tmpval = va_listval(va_arg(ap, va_listarg));
++ va_copy(ap, tmpval);
+ #endif
+ break;
+ case 0:
diff --git a/shells/ast-ksh/files/patch-src_lib_libast_string_tokscan.c b/shells/ast-ksh/files/patch-src_lib_libast_string_tokscan.c
new file mode 100644
index 000000000000..45ca85c6f644
--- /dev/null
+++ b/shells/ast-ksh/files/patch-src_lib_libast_string_tokscan.c
@@ -0,0 +1,20 @@
+--- src/lib/libast/string/tokscan.c.orig 2021-04-21 15:45:06 UTC
++++ src/lib/libast/string/tokscan.c
+@@ -197,6 +197,7 @@ tokscan(register char* s, char** nxt, const char* fmt,
+ char** p_string;
+ char* prv_f = 0;
+ va_list prv_ap;
++ va_listarg tmpval;
+
+ va_start(ap, fmt);
+ if (!*s || *s == '\n')
+@@ -250,7 +251,8 @@ tokscan(register char* s, char** nxt, const char* fmt,
+ va_copy(ap, np);
+ }
+ #else
+- va_copy(ap, va_listval(va_arg(ap, va_listarg)));
++ tmpval = va_listval(va_arg(ap, va_listarg));
++ va_copy(ap, tmpval);
+ #endif
+ continue;
+ case 'c':
More information about the dev-commits-ports-all
mailing list