freebsd-ports/shells/ksh93/files/patch-src-lib-libast-hash-hashalloc.c
Sunpoet Po-Chuan Hsieh 22bf4d7140 - Fix build on armv6
- While I'm here, fix diff header of patch file

PR:		209457
Submitted by:	<mikael.urankar@gmail.com>
Obtained from:	https://github.com/att/ast/blob/beta/src/lib/libast/hash/hashalloc.c
		https://github.com/att/ast/blob/beta/src/lib/libast/string/tokscan.c
2016-10-28 15:08:14 +00:00

20 lines
445 B
C

--- src/lib/libast/hash/hashalloc.c.orig 2006-11-07 22:29:04 UTC
+++ src/lib/libast/hash/hashalloc.c
@@ -151,7 +151,16 @@ hashalloc(Hash_table_t* ref, ...)
va_copy(*vp, ap);
vp++;
}
+#if __clang__ && __SIZEOF_POINTER__ == 4
+ {
+ va_list np;
+
+ np = va_listval(va_arg(ap, va_listarg));
+ va_copy(ap, np);
+ }
+#else
va_copy(ap, va_listval(va_arg(ap, va_listarg)));
+#endif
break;
case 0:
if (vp > va)