Преглед изворни кода

fuzz: add support for compiling with c++ compiler

Randy пре 5 година
родитељ
комит
73b0e739d0
1 измењених фајлова са 8 додато и 0 уклоњено
  1. 8 0
      fuzzing/cjson_read_fuzzer.c

+ 8 - 0
fuzzing/cjson_read_fuzzer.c

@@ -2,6 +2,10 @@
 #include <stdint.h>
 #include <stdint.h>
 #include <string.h>
 #include <string.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "../cJSON.h"
 #include "../cJSON.h"
 
 
 int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); /* required by C89 */
 int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); /* required by C89 */
@@ -66,3 +70,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
 
 
     return 0;
     return 0;
 }
 }
+
+#ifdef __cplusplus
+}
+#endif