kiss-mfavila-small/ports/es/patches/musl.patch

34 lines
697 B
Diff

--- print.c.orig
+++ print.c
@@ -273,15 +273,10 @@
va_list saveargs = format->args;
#endif
-
VA_START(format->args, fmt);
n += printfmt(format, fmt);
va_end(format->args);
-#ifndef __va_copy
- format->args = saveargs;
-#else
- __va_copy(format->args, saveargs);
-#endif
+ va_copy(format->args, saveargs);
return n + format->flushed;
}
--- stdenv.h.orig
+++ stdenv.h
@@ -204,6 +204,11 @@
#define VARARGS2(t1, v1, t2, v2) (v1, v2, va_alist) t1 v1; t2 v2; va_dcl
#define VA_START(ap, var) va_start(ap)
+/* __va_* are defined by the compiler */
+#define va_start(ap) __va_start(ap)
+#define va_copy(dest, src) __va_copy(dest, src)
+#define va_end(ap) __va_end(ap)
+
#endif