diff options
author | David Carlier <devnexen@gmail.com> | 2020-06-14 15:26:43 +0000 |
---|---|---|
committer | David Carlier <devnexen@gmail.com> | 2020-06-14 15:32:02 +0000 |
commit | 67d87dd2a9dbc393b56162e77ff3178f4e3f59fa (patch) | |
tree | 24a839cd715e1bc204edeff4ee886f04d7fca267 /gcc_plugin | |
parent | bfe5b88e782ffd3f97c2a25da60b0b36552a6a64 (diff) | |
download | afl++-67d87dd2a9dbc393b56162e77ff3178f4e3f59fa.tar.gz |
Porting to Haiku.
getrusage does not implement resident memory gathering, no shm api neither.
Diffstat (limited to 'gcc_plugin')
-rw-r--r-- | gcc_plugin/GNUmakefile | 4 | ||||
-rw-r--r-- | gcc_plugin/afl-gcc-fast.c | 2 | ||||
-rw-r--r-- | gcc_plugin/afl-gcc-rt.o.c | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/gcc_plugin/GNUmakefile b/gcc_plugin/GNUmakefile index 9a404966..0f69e924 100644 --- a/gcc_plugin/GNUmakefile +++ b/gcc_plugin/GNUmakefile @@ -61,12 +61,14 @@ ifeq "$(shell echo '$(HASH)include <sys/ipc.h>@$(HASH)include <sys/shm.h>@int ma else SHMAT_OK=0 CFLAGS+=-DUSEMMAP=1 - LDFLAGS += -lrt endif ifeq "$(TEST_MMAP)" "1" SHMAT_OK=0 CFLAGS+=-DUSEMMAP=1 +endif + +ifneq "$(shell uname -s)" "Haiku" LDFLAGS += -lrt endif diff --git a/gcc_plugin/afl-gcc-fast.c b/gcc_plugin/afl-gcc-fast.c index 164c72c2..bd780b40 100644 --- a/gcc_plugin/afl-gcc-fast.c +++ b/gcc_plugin/afl-gcc-fast.c @@ -231,7 +231,7 @@ static void edit_params(u32 argc, char **argv) { } -#ifdef USEMMAP +#if defined(USEMMAP) && !defined(__HAIKU__) cc_params[cc_par_cnt++] = "-lrt"; #endif diff --git a/gcc_plugin/afl-gcc-rt.o.c b/gcc_plugin/afl-gcc-rt.o.c index f41bea17..5c94f68a 100644 --- a/gcc_plugin/afl-gcc-rt.o.c +++ b/gcc_plugin/afl-gcc-rt.o.c @@ -35,7 +35,9 @@ #include <assert.h> #include <sys/mman.h> +#ifndef USEMMAP #include <sys/shm.h> +#endif #include <sys/wait.h> #include <sys/types.h> |