Follow Windows' approach for NetBSD in AlarmCallback()
NetBSD's current behavior needs to ignore check for
InFuzzingThread() in Fuzzer::AlarmCallback().
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer@346194 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/FuzzerLoop.cpp b/FuzzerLoop.cpp
index 7b98f55..09c57c3 100644
--- a/FuzzerLoop.cpp
+++ b/FuzzerLoop.cpp
@@ -275,7 +275,8 @@
void Fuzzer::AlarmCallback() {
assert(Options.UnitTimeoutSec > 0);
// In Windows Alarm callback is executed by a different thread.
-#if !LIBFUZZER_WINDOWS
+ // NetBSD's current behavior needs this change too.
+#if !LIBFUZZER_WINDOWS && !LIBFUZZER_NETBSD
if (!InFuzzingThread())
return;
#endif