[compiler-rt] 2e82492 - [fuzzer][afl] Fix build with GCC
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Tue May 26 11:35:56 PDT 2020
Author: Kostya Serebryany
Date: 2020-05-26T11:35:50-07:00
New Revision: 2e824925402f011c2a4d3a0b51cce388b6d14d16
URL: https://github.com/llvm/llvm-project/commit/2e824925402f011c2a4d3a0b51cce388b6d14d16
DIFF: https://github.com/llvm/llvm-project/commit/2e824925402f011c2a4d3a0b51cce388b6d14d16.diff
LOG: [fuzzer][afl] Fix build with GCC
Summary:
Fixes this build error with GCC 9.3.0:
```
../lib/fuzzer/afl/afl_driver.cpp:114:30: error: expected unqualified-id before string constant
114 | __attribute__((weak)) extern "C" void __sanitizer_set_report_fd(void *);
| ^~~
```
Reviewers: metzman, kcc
Reviewed By: kcc
Subscribers: #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D80479
Added:
Modified:
compiler-rt/lib/fuzzer/afl/afl_driver.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/fuzzer/afl/afl_driver.cpp b/compiler-rt/lib/fuzzer/afl/afl_driver.cpp
index bb3b48f36728..457f180ecc82 100644
--- a/compiler-rt/lib/fuzzer/afl/afl_driver.cpp
+++ b/compiler-rt/lib/fuzzer/afl/afl_driver.cpp
@@ -111,7 +111,7 @@ static uint8_t AflInputBuf[kMaxAflInputSize];
// Use this optionally defined function to output sanitizer messages even if
// user asks to close stderr.
-__attribute__((weak)) extern "C" void __sanitizer_set_report_fd(void *);
+extern "C" __attribute__((weak)) void __sanitizer_set_report_fd(void *);
// Keep track of where stderr content is being written to, so that
// dup_and_close_stderr can use the correct one.
More information about the llvm-commits
mailing list