ports/math/reduce/files/patch-generic_newfront_redfront.h
Kyle Evans efde936cf4 math/reduce: fix the build with LLVM 11
reduce started to fail with the default switch to -fno-common in LLVM 11
(and GCC 10). This patch was written then confirmed to be the fix that
upstream also provided in late March.

MFH:		2020Q3 (-fno-common build fix)
2020-08-30 21:06:10 +00:00

25 lines
654 B
C

--- generic/newfront/redfront.h.orig 2018-06-17 19:20:00 UTC
+++ generic/newfront/redfront.h
@@ -114,8 +114,11 @@ typedef void (*sig_t)(int);
* version is different...
*/
#ifndef NATIVE_WINDOWS
+
#include "sys.h"
+#ifndef wcwidth
extern int wcwidth(wchar_t c);
+#endif
#include "chartype.h"
#endif
@@ -133,8 +133,8 @@ extern int wcwidth(wchar_t c);
#define HANDLE_T int
#endif
-HANDLE_T MeToReduce[2];
-HANDLE_T ReduceToMe[2];
+extern HANDLE_T MeToReduce[2];
+extern HANDLE_T ReduceToMe[2];
extern int redread(HANDLE_T h, void *buffer, int len);
extern int redwrite(HANDLE_T h, void *buffer, int len);
extern void redclose(HANDLE_T h);