From e83dd5b0aa6d05680b63b01082eceb9e5f33b3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Fri, 20 Apr 2018 23:59:42 +0200 Subject: [PATCH] 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 --- fuzz/wget_css_fuzzer.c | 6 ++++-- fuzz/wget_html_fuzzer.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/fuzz/wget_css_fuzzer.c b/fuzz/wget_css_fuzzer.c index 3b521cb5..bcdeb5e2 100644 --- a/fuzz/wget_css_fuzzer.c +++ b/fuzz/wget_css_fuzzer.c @@ -29,7 +29,10 @@ #include // close #include // 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 diff --git a/fuzz/wget_html_fuzzer.c b/fuzz/wget_html_fuzzer.c index 1e262a16..a6c4fdc5 100644 --- a/fuzz/wget_html_fuzzer.c +++ b/fuzz/wget_html_fuzzer.c @@ -29,7 +29,10 @@ #include // close #include // 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