From 01fbe7bf37909736b4ba99d30c34378f561d6761 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 18 Nov 2011 14:04:21 +0100 Subject: [PATCH] build: compile with -D__DARWIN_64_BIT_INO_T on OS X Fixes a struct stat size mismatch on 64 bits machines that made Node crash with a EXC_BAD_ACCESS on startup. Solution proposed by Paddy Byers. --- config-unix.mk | 1 + uv.gyp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/config-unix.mk b/config-unix.mk index 8fe7254c..759be4e0 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -50,6 +50,7 @@ endif ifeq (Darwin,$(uname_S)) EV_CONFIG=config_darwin.h EIO_CONFIG=config_darwin.h +CPPFLAGS += -D__DARWIN_64_BIT_INO_T=1 CPPFLAGS += -Isrc/ares/config_darwin LINKFLAGS+=-framework CoreServices OBJS += src/unix/darwin.o diff --git a/uv.gyp b/uv.gyp index 83129b5c..88cee32b 100644 --- a/uv.gyp +++ b/uv.gyp @@ -9,6 +9,9 @@ 'EIO_STACKSIZE=262144' ], 'conditions': [ + ['OS=="mac"', { + 'defines': ['__DARWIN_64_BIT_INO_T=1'], + }], ['OS=="solaris"', { 'cflags': ['-pthreads'], 'ldlags': ['-pthreads'],