make fuzz target compilable as c++ code

This commit is contained in:
Randy 2020-06-01 06:18:13 +02:00
parent 9cd6cdc0e5
commit c8303509fa
1 changed files with 9 additions and 0 deletions

View File

@ -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