Closed PHHargrove closed 10 years ago
Sigh. The NetBSD manpage agrees with the decl in upc_sysdep.c. However, as you can see in the error they've declared a pointer rather than an array.
The following allowed my build to complete. Not sure if this is the best solution.
--- llvm-upc/src/tools/clang/runtime/libupc/smp/upc_sysdep.c~ 2014-02-26 16:09:20.000000000 -0800
+++ llvm-upc/src/tools/clang/runtime/libupc/smp/upc_sysdep.c 2014-02-26 16:12:49.000000000 -0800
@@ -43,9 +43,7 @@
char **sys_siglist = _sys_siglist;
const int nsig = _sys_nsig;
#else
+ #ifndef __NetBSD__ // signal.h has pointer decl instead of array
extern const char * const sys_siglist[];
+ #endif
const int nsig = NSIG;
#endif
if (sig > 0 && sig < nsig)
Your suggested patch looks OK to me. Please commit.
See below for the error I encounter building clang-upc on NetBSD6/amd64.
Looks like
sys_siglist
is not very portable, as you already have an #if for sgi.I will see about a patch for this issue mysef, since I am able to test.