mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-09 16:51:34 +00:00
Merge pull request #295 from devnexen/android_build_fix
Android build fix proposal.
This commit is contained in:
commit
2e29e64a3f
@ -36,6 +36,7 @@ SH_PROGS = afl-plot afl-cmin afl-cmin.bash afl-whatsup afl-system-config
|
|||||||
MANPAGES=$(foreach p, $(PROGS) $(SH_PROGS), $(p).8) afl-as.8
|
MANPAGES=$(foreach p, $(PROGS) $(SH_PROGS), $(p).8) afl-as.8
|
||||||
ASAN_OPTIONS=detect_leaks=0
|
ASAN_OPTIONS=detect_leaks=0
|
||||||
|
|
||||||
|
ifeq "$(findstring android, $(shell $(CC) --version 2>/dev/null))" ""
|
||||||
ifeq "$(shell echo 'int main() {return 0; }' | $(CC) $(CFLAGS) -Werror -x c - -flto=full -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1"
|
ifeq "$(shell echo 'int main() {return 0; }' | $(CC) $(CFLAGS) -Werror -x c - -flto=full -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1"
|
||||||
CFLAGS_FLTO ?= -flto=full
|
CFLAGS_FLTO ?= -flto=full
|
||||||
else
|
else
|
||||||
@ -47,6 +48,7 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq "$(shell uname)" "Darwin"
|
ifneq "$(shell uname)" "Darwin"
|
||||||
ifeq "$(shell echo 'int main() {return 0; }' | $(CC) $(CFLAGS) -Werror -x c - -march=native -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1"
|
ifeq "$(shell echo 'int main() {return 0; }' | $(CC) $(CFLAGS) -Werror -x c - -march=native -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1"
|
||||||
|
@ -451,7 +451,7 @@ void load_auto(afl_state_t *afl) {
|
|||||||
u8 *fn = alloc_printf("%s/.state/auto_extras/auto_%06u", afl->in_dir, i);
|
u8 *fn = alloc_printf("%s/.state/auto_extras/auto_%06u", afl->in_dir, i);
|
||||||
s32 fd, len;
|
s32 fd, len;
|
||||||
|
|
||||||
fd = open(fn, O_RDONLY, 0600);
|
fd = open(fn, O_RDONLY);
|
||||||
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
|
||||||
|
@ -154,7 +154,8 @@ static u32 write_results_to_file(afl_forkserver_t *fsrv, u8 *outfile) {
|
|||||||
|
|
||||||
if (!strncmp(outfile, "/dev/", 5)) {
|
if (!strncmp(outfile, "/dev/", 5)) {
|
||||||
|
|
||||||
fd = open(outfile, O_WRONLY, 0600);
|
fd = open(outfile, O_WRONLY);
|
||||||
|
|
||||||
if (fd < 0) PFATAL("Unable to open '%s'", fsrv->out_file);
|
if (fd < 0) PFATAL("Unable to open '%s'", fsrv->out_file);
|
||||||
|
|
||||||
} else if (!strcmp(outfile, "-")) {
|
} else if (!strcmp(outfile, "-")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user