From ce5eb6d85a573985aef5e9e2bfe8bba145163189 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 20 Jul 2011 17:58:27 +0200 Subject: [PATCH] config-unix: drop --std=c89 on cygwin, hides CLOCK_MONOTONIC. Fixes #112. --- config-unix.mk | 2 ++ src/uv-unix.c | 2 ++ 2 files changed, 4 insertions(+) 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"