diff --git a/buffer.c b/buffer.c index 50908b19..94a30bc5 100644 --- a/buffer.c +++ b/buffer.c @@ -26,6 +26,7 @@ */ #include "event2/event-config.h" +#include "event-private.h" #ifdef WIN32 #include @@ -34,8 +35,9 @@ #endif #ifdef _EVENT_HAVE_VASPRINTF -/* If we have vasprintf, we need to define this before we include stdio.h. */ -#define _GNU_SOURCE +/* If we have vasprintf, we need to define _GNU_SOURCE before we include + * stdio.h. This comes from event-private.h. + */ #endif #include diff --git a/evutil.c b/evutil.c index 2cb33370..5c2e8395 100644 --- a/evutil.c +++ b/evutil.c @@ -26,7 +26,7 @@ #include "event2/event-config.h" -#define _GNU_SOURCE +#include "event-private.h" #ifdef WIN32 #include