about summary refs log tree commit diff
path: root/instrumentation/afl-llvm-common.h
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2024-11-09 22:31:07 +0100
committerhexcoder- <heiko@hexco.de>2024-11-09 22:31:07 +0100
commitf39cf57eac13f859fcf8c082b038ee6254bc0da9 (patch)
treeb07e7e44cdceac332fa7a3e0f0451aa23322a2cc /instrumentation/afl-llvm-common.h
parente62999c95f3e796c8f6ff8beab36799a661c755c (diff)
downloadafl++-f39cf57eac13f859fcf8c082b038ee6254bc0da9.tar.gz
enhance backward compatibility and portability
Diffstat (limited to 'instrumentation/afl-llvm-common.h')
-rw-r--r--instrumentation/afl-llvm-common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/instrumentation/afl-llvm-common.h b/instrumentation/afl-llvm-common.h
index 6b628d64..98c4c7c9 100644
--- a/instrumentation/afl-llvm-common.h
+++ b/instrumentation/afl-llvm-common.h
@@ -8,7 +8,13 @@
 #include <list>
 #include <string>
 #include <fstream>
+
+#ifdef __has_include
+#if __has_include(<optional>)
 #include <optional>
+#endif
+#endif
+
 #include <sys/time.h>
 
 #include "llvm/Config/llvm-config.h"