mirror of
https://github.com/mirror/wget.git
synced 2025-04-02 15:40:12 +08:00
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:
parent
0b02993e39
commit
e83dd5b0aa
@ -29,6 +29,9 @@
|
|||||||
#include <unistd.h> // close
|
#include <unistd.h> // close
|
||||||
#include <setjmp.h> // longjmp, setjmp
|
#include <setjmp.h> // longjmp, setjmp
|
||||||
|
|
||||||
|
#include "wget.h"
|
||||||
|
#undef fopen_wgetrc
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -55,7 +58,6 @@ FILE *fopen_wget(const char *pathname, const char *mode)
|
|||||||
return fopen("/dev/null", mode);
|
return fopen("/dev/null", mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef fopen_wgetrc
|
|
||||||
FILE *fopen_wgetrc(const char *pathname, const char *mode)
|
FILE *fopen_wgetrc(const char *pathname, const char *mode)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_FMEMOPEN
|
#ifdef HAVE_FMEMOPEN
|
||||||
|
@ -29,6 +29,9 @@
|
|||||||
#include <unistd.h> // close
|
#include <unistd.h> // close
|
||||||
#include <setjmp.h> // longjmp, setjmp
|
#include <setjmp.h> // longjmp, setjmp
|
||||||
|
|
||||||
|
#include "wget.h"
|
||||||
|
#undef fopen_wgetrc
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -56,7 +59,6 @@ FILE *fopen_wget(const char *pathname, const char *mode)
|
|||||||
return fopen("/dev/null", mode);
|
return fopen("/dev/null", mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef fopen_wgetrc
|
|
||||||
FILE *fopen_wgetrc(const char *pathname, const char *mode)
|
FILE *fopen_wgetrc(const char *pathname, const char *mode)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_FMEMOPEN
|
#ifdef HAVE_FMEMOPEN
|
||||||
|
Loading…
Reference in New Issue
Block a user