浏览代码

make fuzz target compilable as c++ code

Randy 5 年之前
父节点
当前提交
c8303509fa
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      tests/stbi_read_fuzzer.c

+ 9 - 0
tests/stbi_read_fuzzer.c

@@ -1,7 +1,12 @@
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define STB_IMAGE_IMPLEMENTATION
 
 #include "../stb_image.h"
 
+
 int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
 {
     int x, y, channels;
@@ -17,3 +22,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
 
     return 0;
 }
+
+#ifdef __cplusplus
+}
+#endif