diff --git a/config-unix.mk b/config-unix.mk index 2b44dd64..13526827 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -65,6 +65,8 @@ endif ifneq (,$(findstring CYGWIN,$(uname_S))) EV_CONFIG=config_cygwin.h EIO_CONFIG=config_cygwin.h +# We drop the --std=c89, it hides CLOCK_MONOTONIC on cygwin +CSTDFLAG = -D_GNU_SOURCE CPPFLAGS += -Isrc/ares/config_cygwin LINKFLAGS+= UV_OS_FILE=uv-cygwin.c diff --git a/src/uv-unix.c b/src/uv-unix.c index 35443922..842fe326 100644 --- a/src/uv-unix.c +++ b/src/uv-unix.c @@ -18,7 +18,9 @@ * IN THE SOFTWARE. */ +#ifndef _GNU_SOURCE #define _GNU_SOURCE /* O_CLOEXEC, accept4(), etc. */ +#endif #include "uv.h" #include "uv-common.h"