From 8cd3d71229730233b38343156e4c1036a4df9a78 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 1 Jul 2011 09:51:24 -0400 Subject: [PATCH] fix linux build --- config-unix.mk | 1 + uv-linux.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/config-unix.mk b/config-unix.mk index 0236f09f..f63bbb22 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -85,6 +85,7 @@ EIO_CPPFLAGS += -DEIO_CONFIG_H=\"$(EIO_CONFIG)\" EIO_CPPFLAGS += -DEIO_STACKSIZE=65536 EIO_CPPFLAGS += -D_LARGEFILE_SOURCE EIO_CPPFLAGS += -D_FILE_OFFSET_BITS=64 +EIO_CPPFLAGS += -D_GNU_SOURCE eio/eio.o: eio/eio.c $(CC) $(EIO_CPPFLAGS) $(CFLAGS) -c eio/eio.c -o eio/eio.o diff --git a/uv-linux.c b/uv-linux.c index 2d26c9bc..8f088043 100644 --- a/uv-linux.c +++ b/uv-linux.c @@ -24,6 +24,9 @@ #include #include +#undef NANOSEC +#define NANOSEC 1000000 + /* * There's probably some way to get time from Linux than gettimeofday(). What * it is, I don't know.