Avoid compilation errors if getaddrinfo() or freeaddrinfo() are macros.

If this is the case we probably can't stub out the functions but
at least the fuzzer will compile.
This commit is contained in:
Todd C. Miller
2023-01-31 13:33:59 -07:00
parent 7c5f0d3052
commit 3c9c8668c1

View File

@@ -177,6 +177,10 @@ fuzz_hook_stub(struct sudo_hook *hook)
* can look up "localhost" and returns an error for anything else.
*/
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
/* Avoid compilation errors if getaddrinfo() or freeaddrinfo() are macros. */
# undef getaddrinfo
# undef freeaddrinfo
int
# ifdef HAVE_GETADDRINFO
getaddrinfo(