mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-24 04:33:24 +00:00
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@saper.info (maintainer)
This commit is contained in:
parent
89f594d34d
commit
27ff8d373e
20
shells/ast-ksh/files/patch-src_lib_libast_hash_hashalloc.c
Normal file
20
shells/ast-ksh/files/patch-src_lib_libast_hash_hashalloc.c
Normal file
@ -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:
|
20
shells/ast-ksh/files/patch-src_lib_libast_string_tokscan.c
Normal file
20
shells/ast-ksh/files/patch-src_lib_libast_string_tokscan.c
Normal file
@ -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':
|
Loading…
Reference in New Issue
Block a user