Illumos biuld fix
MODIFY
include/afl-fuzz.h
include/afl-fuzz.h
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
+#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
+#endif
#ifdef __ANDROID__
#include "android-ashmem.h"

MODIFY
src/afl-analyze.c
src/afl-analyze.c
@@ -723,7 +723,7 @@ static void set_up_environment(void) {
}
- prog_in = alloc_printf("%s/.afl-analyze-temp-%u", use_dir, getpid());
+ prog_in = alloc_printf("%s/.afl-analyze-temp-%u", use_dir, (u32)getpid());
}

MODIFY
src/afl-as.c
src/afl-as.c
@@ -233,7 +233,7 @@ static void edit_params(int argc, char **argv) {
}
modified_file =
- alloc_printf("%s/.afl-%u-%u.s", tmp_dir, getpid(), (u32)time(NULL));
+ alloc_printf("%s/.afl-%u-%u.s", tmp_dir, (u32)getpid(), (u32)time(NULL));
wrap_things_up:

MODIFY
src/afl-fuzz-stats.c
src/afl-fuzz-stats.c
@@ -72,7 +72,7 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability,
"start_time : %llu\n"
"last_update : %llu\n"
"run_time : %llu\n"
- "fuzzer_pid : %d\n"
+ "fuzzer_pid : %u\n"
"cycles_done : %llu\n"
"cycles_wo_finds : %llu\n"
"execs_done : %llu\n"
@@ -106,7 +106,7 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability,
"target_mode : %s%s%s%s%s%s%s%s\n"
"command_line : %s\n",
afl->start_time / 1000, cur_time / 1000,
- (cur_time - afl->start_time) / 1000, getpid(),
+ (cur_time - afl->start_time) / 1000, (u32)getpid(),
afl->queue_cycle ? (afl->queue_cycle - 1) : 0, afl->cycles_wo_finds,
afl->fsrv.total_execs,
afl->fsrv.total_execs /

MODIFY
src/afl-showmap.c
src/afl-showmap.c
@@ -865,7 +865,7 @@ int main(int argc, char **argv_orig, char **envp) {
}
- stdin_file = alloc_printf("%s/.afl-showmap-temp-%u", use_dir, getpid());
+ stdin_file = alloc_printf("%s/.afl-showmap-temp-%u", use_dir, (u32)getpid());
unlink(stdin_file);
atexit(at_exit_handler);
fsrv->out_fd = open(stdin_file, O_RDWR | O_CREAT | O_EXCL, 0600);

MODIFY
src/afl-tmin.c
src/afl-tmin.c
@@ -619,7 +619,7 @@ static void set_up_environment(afl_forkserver_t *fsrv) {
}
- out_file = alloc_printf("%s/.afl-tmin-temp-%u", use_dir, getpid());
+ out_file = alloc_printf("%s/.afl-tmin-temp-%u", use_dir, (u32)getpid());
}

Illumos biuld fix (#357)