vp-build/srcpkgs/gcc-multilib/patches/fix-inline_vfprintf.patch

27 lines
700 B
Diff

Work around a bug when compiling the definition for
vfprintf(2) in /usr/include/bits/stdio2.h, which does
not guarantee inlined code for _FORTIFY_SOURCE=2.
Here we just don't include <stdio.h> and declare
the required types and functions locally.
--- libitm/util.cc 2015-09-02 17:19:01.176016940 +0200
+++ libitm/util.cc 2015-09-02 17:20:03.045016757 +0200
@@ -24,10 +24,15 @@
#include "libitm_i.h"
#include <stdarg.h>
-#include <stdio.h>
+#define FILE void
+extern FILE* stderr;
+extern int fputs(const char*, FILE *);
+extern int fputc(char, FILE *);
+extern int vfprintf(FILE*, const char*, va_list);
+
namespace GTM HIDDEN {
static void
gtm_verror (const char *fmt, va_list list)
{