diff --git a/src/unix/getaddrinfo.c b/src/unix/getaddrinfo.c index 5718af64..d09bfcdc 100644 --- a/src/unix/getaddrinfo.c +++ b/src/unix/getaddrinfo.c @@ -18,6 +18,13 @@ * IN THE SOFTWARE. */ +/* Expose glibc-specific EAI_* error codes. Needs to be defined before we + * include any headers. + */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif + #include "uv.h" #include "internal.h" diff --git a/src/uv-common.c b/src/uv-common.c index aaee9305..9a597d38 100644 --- a/src/uv-common.c +++ b/src/uv-common.c @@ -19,13 +19,6 @@ * IN THE SOFTWARE. */ -/* Expose glibc-specific EAI_* error codes. Needs to be defined before we - * include any headers. - */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif - #include "uv.h" #include "uv-common.h"