aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-12-07 14:36:04 +0100
committervan Hauser <vh@thc.org>2020-12-07 14:36:04 +0100
commite6de85861c4ec8fcc13a7f945bc8b3dfefa193bc (patch)
tree09ea94440fa0ccf5941fb13c3d48a5b845507b62
parent4c2e375e22a0b3c88380e6dd51dbac5d2c5ac5ff (diff)
downloadafl++-e6de85861c4ec8fcc13a7f945bc8b3dfefa193bc.tar.gz
fixes and code format
-rw-r--r--instrumentation/README.lto.md4
-rw-r--r--src/afl-cc.c15
2 files changed, 8 insertions, 11 deletions
diff --git a/instrumentation/README.lto.md b/instrumentation/README.lto.md
index 37d51de8..a2814173 100644
--- a/instrumentation/README.lto.md
+++ b/instrumentation/README.lto.md
@@ -80,8 +80,8 @@ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
apt-get update && apt-get upgrade -y
apt-get install -y clang-12 clang-tools-12 libc++1-12 libc++-12-dev \
libc++abi1-12 libc++abi-12-dev libclang1-12 libclang-12-dev \
- libclang-common-12-dev libclang-cpp11 libclang-cpp11-dev liblld-12 \
- liblld-12-dev liblldb-12 liblldb-12-dev libllvm11 libomp-12-dev \
+ libclang-common-12-dev libclang-cpp12 libclang-cpp12-dev liblld-12 \
+ liblld-12-dev liblldb-12 liblldb-12-dev libllvm12 libomp-12-dev \
libomp5-12 lld-12 lldb-12 llvm-12 llvm-12-dev llvm-12-runtime llvm-12-tools
```
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 50334139..273a9f2f 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -192,25 +192,21 @@ static u8 *find_object(u8 *obj, u8 *argv0) {
}
-#if \
- defined(__FreeBSD__) \
-|| defined(__DragonFly__) \
-|| defined(__linux__) \
-|| defined(__ANDROID__) \
-|| defined(__NetBSD__)
-#define HAS_PROC_FS 1
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__linux__) || \
+ defined(__ANDROID__) || defined(__NetBSD__)
+ #define HAS_PROC_FS 1
#endif
#ifdef HAS_PROC_FS
else {
char *procname = NULL;
-#if defined(__FreeBSD__) || defined(__DragonFly__)
+ #if defined(__FreeBSD__) || defined(__DragonFly__)
procname = "/proc/curproc/file";
#elif defined(__linux__) || defined(__ANDROID__)
procname = "/proc/self/exe";
#elif defined(__NetBSD__)
procname = "/proc/curproc/exe";
-#endif
+ #endif
if (procname) {
char exepath[PATH_MAX];
@@ -251,6 +247,7 @@ static u8 *find_object(u8 *obj, u8 *argv0) {
}
}
+
#endif
#undef HAS_PROC_FS