void-packages/srcpkgs/elfutils/patches/musl-obstack_printf.patch
2015-11-20 09:05:10 +01:00

24 lines
564 B
Diff

--- src/nm.c 2015-08-21 14:22:37.000000000 +0200
+++ src/nm.c 2015-11-20 07:31:20.508347429 +0100
@@ -46,6 +46,21 @@
#include <system.h>
#include "../libebl/libeblP.h"
+#if !defined(__GLIBC__)
+static int obstack_printf(struct obstack *obst, const char *fmt, ...)
+{
+ char buf[1024];
+ va_list ap;
+ int len;
+
+ va_start(ap, fmt);
+ len = vsnprintf(buf, sizeof(buf), fmt, ap);
+ obstack_grow(obst, buf, len);
+ va_end(ap);
+
+ return len;
+}
+#endif
/* Name and version of program. */
static void print_version (FILE *stream, struct argp_state *state);