[compiler-rt] r317978 - Correct NetBSD build issue

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 11 01:29:21 PST 2017


Author: kamil
Date: Sat Nov 11 01:29:21 2017
New Revision: 317978

URL: http://llvm.org/viewvc/llvm-project?rev=317978&view=rev
Log:
Correct NetBSD build issue

Cast SIG_IGN to (uptr).

SIG_IGN is defined on NetBSD as a function pointer and cannot be
assigned to an integer as it is.

sys/signal.h:#define       SIG_IGN         ((void (*)(int))  1)

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc?rev=317978&r1=317977&r2=317978&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc Sat Nov 11 01:29:21 2017
@@ -105,7 +105,7 @@ unsigned struct_msqid_ds_sz = sizeof(str
 unsigned struct_mq_attr_sz = sizeof(struct mq_attr);
 unsigned struct_statvfs_sz = sizeof(struct statvfs);
 
-const uptr sig_ign = SIG_IGN;
+const uptr sig_ign = (uptr)SIG_IGN;
 const uptr sig_dfl = (uptr)SIG_DFL;
 const uptr sig_err = (uptr)SIG_ERR;
 const uptr sa_siginfo = (uptr)SA_SIGINFO;




More information about the llvm-commits mailing list