From e909d5f5c2901c375380e4153b97ce34c04ea16f Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Sat, 21 Sep 2019 12:07:29 +0200 Subject: fix macos commit to make it portable again. Would not compile on OpenBSD. --- src/afl-fuzz-init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/afl-fuzz-init.c') diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c index 4908626a..808edb2b 100644 --- a/src/afl-fuzz-init.c +++ b/src/afl-fuzz-init.c @@ -1478,8 +1478,9 @@ void check_cpu_governor(void) { " to make afl-fuzz skip this check - but expect some performance " "drop.\n", min / 1024, max / 1024); + FATAL("Suboptimal CPU scaling governor"); -#else +#elsif defined __APPLE__ u64 min = 0, max = 0; size_t mlen = sizeof(min); if (getenv("AFL_SKIP_CPUFREQ")) return; @@ -1510,8 +1511,8 @@ void check_cpu_governor(void) { " to make afl-fuzz skip this check - but expect some performance " "drop.\n", min / 1024, max / 1024); -#endif FATAL("Suboptimal CPU scaling governor"); +#endif } /* Count the number of logical CPU cores. */ -- cgit 1.4.1 From ad1750b53d51787e52977181c4e032adb489ac13 Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Sat, 21 Sep 2019 10:13:11 +0200 Subject: oops, typo corrected --- src/afl-fuzz-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/afl-fuzz-init.c') diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c index 808edb2b..fab82e2d 100644 --- a/src/afl-fuzz-init.c +++ b/src/afl-fuzz-init.c @@ -1480,7 +1480,7 @@ void check_cpu_governor(void) { min / 1024, max / 1024); FATAL("Suboptimal CPU scaling governor"); -#elsif defined __APPLE__ +#elif defined __APPLE__ u64 min = 0, max = 0; size_t mlen = sizeof(min); if (getenv("AFL_SKIP_CPUFREQ")) return; -- cgit 1.4.1