mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-12 01:58:17 +00:00
Android supports arc4 api.
This commit is contained in:
@ -108,7 +108,7 @@ typedef int64_t s64;
|
|||||||
})
|
})
|
||||||
|
|
||||||
#ifdef AFL_LLVM_PASS
|
#ifdef AFL_LLVM_PASS
|
||||||
#if defined(__linux__)
|
#if defined(__linux__) || !defined(__ANDROID__)
|
||||||
#define AFL_SR(s) (srandom(s))
|
#define AFL_SR(s) (srandom(s))
|
||||||
#define AFL_R(x) (random() % (x))
|
#define AFL_R(x) (random() % (x))
|
||||||
#else
|
#else
|
||||||
@ -116,7 +116,7 @@ typedef int64_t s64;
|
|||||||
#define AFL_R(x) (arc4random_uniform(x))
|
#define AFL_R(x) (arc4random_uniform(x))
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if defined(__linux__)
|
#if defined(__linux__) || !defined(__ANDROID__)
|
||||||
#define SR(s) (srandom(s))
|
#define SR(s) (srandom(s))
|
||||||
#define R(x) (random() % (x))
|
#define R(x) (random() % (x))
|
||||||
#else
|
#else
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __linux__
|
#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#ifdef __NR_getrandom
|
#ifdef __NR_getrandom
|
||||||
|
Reference in New Issue
Block a user