From 76cd67686c36e535660b449fb3bd4042084f12ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 21 Aug 2014 14:55:28 +0200 Subject: [PATCH] unix: fix exposing EAI_* glibc-isms --- src/unix/getaddrinfo.c | 7 +++++++ src/uv-common.c | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) 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"