aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Pettersson <[email protected]>2016-01-31 15:13:21 +0100
committerMikael Pettersson <[email protected]>2016-01-31 15:49:49 +0100
commit050480b2326ea3583231a0de02fb087bf51db82a (patch)
tree024ef52b7e2a7b356c712a126a3db9918b2323d9
parent18955a72ddf9190f9850cb6b143fd39ff8ab6168 (diff)
downloadotp-050480b2326ea3583231a0de02fb087bf51db82a.tar.gz
otp-050480b2326ea3583231a0de02fb087bf51db82a.tar.bz2
otp-050480b2326ea3583231a0de02fb087bf51db82a.zip
hipe_x86_signal: cleanups
- add block for NetBSD, define dummy INIT() macro - eliminate ifndef NetBSD around INIT() invocation
-rw-r--r--erts/emulator/hipe/hipe_x86_signal.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/erts/emulator/hipe/hipe_x86_signal.c b/erts/emulator/hipe/hipe_x86_signal.c
index 6887bdacbc..741f570c50 100644
--- a/erts/emulator/hipe/hipe_x86_signal.c
+++ b/erts/emulator/hipe/hipe_x86_signal.c
@@ -192,6 +192,15 @@ static void do_init(void)
#define INIT() do { if (!init_done()) do_init(); } while (0)
#endif /* __FreeBSD__ */
+#if defined(__NetBSD__)
+/*
+ * Note: This is only stub code to allow the build to succeed.
+ * Whether this actually provides the needed overrides for safe
+ * signal delivery or not is unknown.
+ */
+#define INIT() do { } while (0)
+#endif /* __NetBSD__ */
+
#if !(defined(__GLIBC__) || defined(__DARWIN__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__sun__))
/*
* Unknown libc -- assume musl. Note: musl deliberately does not provide a musl-specific
@@ -243,6 +252,7 @@ static int my_sigaction(int signum, const struct sigaction *act, struct sigactio
return __next_sigaction(signum, act, oldact);
}
#endif
+
/*
* This overrides the C library's core sigaction() procedure, catching
* all its internal calls.
@@ -313,9 +323,7 @@ void hipe_signal_init(void)
struct sigaction sa;
int i;
-#ifndef __NetBSD__
INIT();
-#endif
hipe_sigaltstack_init();