diff options
| author | van Hauser <vh@thc.org> | 2020-04-26 16:51:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-26 16:51:21 +0200 |
| commit | 62ec52dd956d62957b431ef804b7956124823f00 (patch) | |
| tree | 706a66892726df089a9d8bf6e8a6e8b1665ff5a8 /libdislocator/libdislocator.so.c | |
| parent | ce9c6df45639db922feafb55259e20c7e82af0bf (diff) | |
| parent | ea876e59a8c1abc979ea05aa4dbe660608aaa9ba (diff) | |
| download | afl++-62ec52dd956d62957b431ef804b7956124823f00.tar.gz | |
Merge pull request #336 from AFLplusplus/dev
pull again ...
Diffstat (limited to 'libdislocator/libdislocator.so.c')
| -rw-r--r-- | libdislocator/libdislocator.so.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c index 8098de91..73ddc292 100644 --- a/libdislocator/libdislocator.so.c +++ b/libdislocator/libdislocator.so.c @@ -37,7 +37,7 @@ #include <sys/param.h> #endif -#ifdef __linux__ +#if defined(__linux__) && !defined(__ANDROID__) #include <unistd.h> #include <sys/syscall.h> #ifdef __NR_getrandom @@ -466,11 +466,13 @@ void *reallocarray(void *ptr, size_t elem_len, size_t elem_cnt) { #if !defined(__ANDROID__) size_t malloc_usable_size(void *ptr) { + #else size_t malloc_usable_size(const void *ptr) { + #endif - return ptr ? PTR_L(ptr) : 0; + return ptr ? PTR_L(ptr) : 0; } @@ -498,3 +500,4 @@ __attribute__((constructor)) void __dislocator_init(void) { align_allocations = !!getenv("AFL_ALIGNED_ALLOC"); } + |
