diff options
author | van Hauser <vh@thc.org> | 2020-07-13 18:06:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-13 18:06:38 +0200 |
commit | e1d46217963e02c00ffbb2fe1a83116403586554 (patch) | |
tree | bdfa03d16d56aabe740ac1415c679b18ab4242c3 | |
parent | 4d929f80fbf22eeb09612a575bcd1a4141b9a8a9 (diff) | |
parent | e137b40eb5a2b66a356c32e410cf676ede3f6f0d (diff) | |
download | afl++-e1d46217963e02c00ffbb2fe1a83116403586554.tar.gz |
Merge pull request #450 from devnexen/haiku_build_fix
Haiku build fix. librt is necessary for Linux primarly and SunOS
-rw-r--r-- | GNUmakefile | 8 | ||||
-rw-r--r-- | examples/afl_network_proxy/afl-network-client.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile index 748cd73c..f44ef95e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -65,7 +65,7 @@ endif ifeq "$(shell uname)" "SunOS" CFLAGS_OPT += -Wno-format-truncation - LDFLAGS=-lkstat + LDFLAGS=-lkstat -lrt endif ifdef STATIC @@ -196,7 +196,7 @@ else endif ifneq "$(filter Linux GNU%,$(shell uname))" "" - LDFLAGS += -ldl + LDFLAGS += -ldl -lrt endif ifneq "$(findstring FreeBSD, $(shell uname))" "" @@ -254,13 +254,13 @@ ifeq "$(shell echo '$(HASH)include <sys/ipc.h>@$(HASH)include <sys/shm.h>@int ma else SHMAT_OK=0 override CFLAGS+=-DUSEMMAP=1 - LDFLAGS += -Wno-deprecated-declarations -lrt + LDFLAGS += -Wno-deprecated-declarations endif ifdef TEST_MMAP SHMAT_OK=0 override CFLAGS += -DUSEMMAP=1 - LDFLAGS += -Wno-deprecated-declarations -lrt + LDFLAGS += -Wno-deprecated-declarations endif all: test_x86 test_shm test_python ready $(PROGS) afl-as test_build all_done diff --git a/examples/afl_network_proxy/afl-network-client.c b/examples/afl_network_proxy/afl-network-client.c index 5af41055..7c4d8b35 100644 --- a/examples/afl_network_proxy/afl-network-client.c +++ b/examples/afl_network_proxy/afl-network-client.c @@ -34,7 +34,9 @@ #include <netinet/ip6.h> #include <arpa/inet.h> #include <sys/mman.h> +#ifndef USEMMAP #include <sys/shm.h> +#endif #include <sys/wait.h> #include <sys/types.h> #include <sys/socket.h> |