Fix fuzzer build for C++

* fuzz/wget_css_fuzzer.c: Include wget.h outside 'extern "C"',
  undef fopen_wgetrc directly after wget.h
* fuzz/wget_html_fuzzer.c: Likewise
This commit is contained in:
Tim Rühsen 2018-04-20 23:59:42 +02:00
parent 0b02993e39
commit e83dd5b0aa
2 changed files with 8 additions and 4 deletions

View File

@ -29,7 +29,10 @@
#include <unistd.h> // close
#include <setjmp.h> // longjmp, setjmp
#ifdef __cplusplus
#include "wget.h"
#undef fopen_wgetrc
#ifdef __cplusplus
extern "C" {
#endif
#include "html-url.h"
@ -55,7 +58,6 @@ FILE *fopen_wget(const char *pathname, const char *mode)
return fopen("/dev/null", mode);
}
#undef fopen_wgetrc
FILE *fopen_wgetrc(const char *pathname, const char *mode)
{
#ifdef HAVE_FMEMOPEN

View File

@ -29,7 +29,10 @@
#include <unistd.h> // close
#include <setjmp.h> // longjmp, setjmp
#ifdef __cplusplus
#include "wget.h"
#undef fopen_wgetrc
#ifdef __cplusplus
extern "C" {
#endif
#include "utils.h"
@ -56,7 +59,6 @@ FILE *fopen_wget(const char *pathname, const char *mode)
return fopen("/dev/null", mode);
}
#undef fopen_wgetrc
FILE *fopen_wgetrc(const char *pathname, const char *mode)
{
#ifdef HAVE_FMEMOPEN