From c6edabdba8f425f1e790e49fe0abb71c1f07a60e Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 13 May 2011 00:47:10 -0700 Subject: [PATCH] Changes to compile in Node --- config-unix.mk | 4 ++-- uv.h | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config-unix.mk b/config-unix.mk index bddd8fc1..500b1890 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -21,7 +21,7 @@ CC = $(PREFIX)gcc AR = $(PREFIX)ar E= -CFLAGS=--std=gnu89 -g +CFLAGS=--std=gnu89 -g -DEV_MULTIPLICITY=0 LINKFLAGS=-lm ifeq (SunOS,$(uname_S)) @@ -29,7 +29,7 @@ LINKFLAGS+=-lsocket -lnsl endif # Need _GNU_SOURCE for strdup? -RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE -DEV_MULTIPLICITY=0 +RUNNER_CFLAGS=$(CFLAGS) -D_GNU_SOURCE RUNNER_LINKFLAGS=$(LINKFLAGS) -pthread RUNNER_LIBS= diff --git a/uv.h b/uv.h index 95dde525..93f865a7 100644 --- a/uv.h +++ b/uv.h @@ -21,6 +21,9 @@ #ifndef UV_H #define UV_H +#ifdef __cplusplus +extern "C" { +#endif #define UV_VERSION_MAJOR 0 #define UV_VERSION_MINOR 1 @@ -268,4 +271,7 @@ int uv_close(uv_handle_t* handle); /* Utility */ struct sockaddr_in uv_ip4_addr(char* ip, int port); +#ifdef __cplusplus +} +#endif #endif /* UV_H */