aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDominik Maier <dmnk@google.com>2024-09-23 21:22:17 +0200
committerDominik Maier <dmnk@google.com>2024-09-23 21:22:17 +0200
commit8b35dd49be5f846e945f6d6a9414623d195a99cb (patch)
tree6c1cba835abf373acf72982caa59b0319c0fbf7f /src
parent703fd0b6104bfc35cd2d49638abe795cdab60636 (diff)
downloadafl++-8b35dd49be5f846e945f6d6a9414623d195a99cb.tar.gz
Fix macOS build
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-init.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index e9036985..9eaa661d 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -1231,6 +1231,7 @@ void perform_dry_run(afl_state_t *afl) {
ck_write(fd, use_mem, read_len, crash_fn);
close(fd);
+#ifdef __linux__
if (afl->fsrv.nyx_mode) {
u8 crash_log_fn[PATH_MAX];
@@ -1247,6 +1248,7 @@ void perform_dry_run(afl_state_t *afl) {
close(fd);
}
+#endif
afl->last_crash_time = get_cur_time();
afl->last_crash_execs = afl->fsrv.total_execs;
@@ -2882,6 +2884,7 @@ void check_binary(afl_state_t *afl, u8 *fname) {
if (strchr(fname, '/') || !(env_path = getenv("PATH"))) {
afl->fsrv.target_path = ck_strdup(fname);
+
#ifdef __linux__
if (afl->fsrv.nyx_mode) {
@@ -2902,8 +2905,8 @@ void check_binary(afl_state_t *afl, u8 *fname) {
afl->fsrv.target_path);
}
-
#endif
+
if (stat(afl->fsrv.target_path, &st) || !S_ISREG(st.st_mode) ||
!(st.st_mode & 0111) || (f_len = st.st_size) < 4) {