about summary refs log tree commit diff
path: root/instrumentation/afl-gcc-common.h
diff options
context:
space:
mode:
authorMaik Betka <9078425+voidptr127@users.noreply.github.com>2023-04-21 11:31:22 +0200
committerMaik Betka <9078425+voidptr127@users.noreply.github.com>2023-04-21 11:31:22 +0200
commit7101ffa1ae79e15d70905b09decbe69cdf53367b (patch)
treefd34b5686a4522dd6d29c9a40cee3d9826b2c7c6 /instrumentation/afl-gcc-common.h
parent9ab902402cd33156257fc0355c0105e7e03f5ba3 (diff)
parent4e5f42cab6b8c501eeaf76ec7ca920089f6e0f3a (diff)
downloadafl++-7101ffa1ae79e15d70905b09decbe69cdf53367b.tar.gz
Merge remote-tracking branch 'origin/dev' into atnwalk
# Conflicts:
#	include/afl-fuzz.h
#	src/afl-fuzz-run.c
Diffstat (limited to 'instrumentation/afl-gcc-common.h')
-rw-r--r--instrumentation/afl-gcc-common.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/instrumentation/afl-gcc-common.h b/instrumentation/afl-gcc-common.h
index 2b71bd22..1d5eb466 100644
--- a/instrumentation/afl-gcc-common.h
+++ b/instrumentation/afl-gcc-common.h
@@ -2,7 +2,7 @@
 
    Copyright 2014-2019 Free Software Foundation, Inc
    Copyright 2015, 2016 Google Inc. All rights reserved.
-   Copyright 2019-2022 AdaCore
+   Copyright 2019-2023 AdaCore
 
    Written by Alexandre Oliva <oliva@adacore.com>, based on the AFL++
    GCC plugin.
@@ -498,3 +498,11 @@ struct afl_base_pass : gimple_opt_pass {
 
 }  // namespace
 
+// compatibility for older gcc versions
+#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= \
+    60200                                               /* >= version 6.2.0 */
+  #define gimple gimple *
+#else
+  #define gimple gimple
+#endif
+