mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 19:38:09 +00:00
Fix macOS build
This commit is contained in:
@ -1231,6 +1231,7 @@ void perform_dry_run(afl_state_t *afl) {
|
|||||||
ck_write(fd, use_mem, read_len, crash_fn);
|
ck_write(fd, use_mem, read_len, crash_fn);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
if (afl->fsrv.nyx_mode) {
|
if (afl->fsrv.nyx_mode) {
|
||||||
|
|
||||||
u8 crash_log_fn[PATH_MAX];
|
u8 crash_log_fn[PATH_MAX];
|
||||||
@ -1247,6 +1248,7 @@ void perform_dry_run(afl_state_t *afl) {
|
|||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
afl->last_crash_time = get_cur_time();
|
afl->last_crash_time = get_cur_time();
|
||||||
afl->last_crash_execs = afl->fsrv.total_execs;
|
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"))) {
|
if (strchr(fname, '/') || !(env_path = getenv("PATH"))) {
|
||||||
|
|
||||||
afl->fsrv.target_path = ck_strdup(fname);
|
afl->fsrv.target_path = ck_strdup(fname);
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if (afl->fsrv.nyx_mode) {
|
if (afl->fsrv.nyx_mode) {
|
||||||
|
|
||||||
@ -2902,8 +2905,8 @@ void check_binary(afl_state_t *afl, u8 *fname) {
|
|||||||
afl->fsrv.target_path);
|
afl->fsrv.target_path);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (stat(afl->fsrv.target_path, &st) || !S_ISREG(st.st_mode) ||
|
if (stat(afl->fsrv.target_path, &st) || !S_ISREG(st.st_mode) ||
|
||||||
!(st.st_mode & 0111) || (f_len = st.st_size) < 4) {
|
!(st.st_mode & 0111) || (f_len = st.st_size) < 4) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user