Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
build: define _DARWIN_USE_64_BIT_INODE=1 on OS X
Browse files Browse the repository at this point in the history
Fixes a segmentation fault on some OS X systems due to sizeof(struct stat)
mismatches.

Fixes #2061.
  • Loading branch information
bnoordhuis committed Apr 2, 2012
1 parent 0965d2d commit ffee873
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deps/uv/config-unix.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif
ifeq (Darwin,$(uname_S))
EV_CONFIG=config_darwin.h
EIO_CONFIG=config_darwin.h
CPPFLAGS += -Isrc/ares/config_darwin
CPPFLAGS += -D_DARWIN_USE_64_BIT_INODE=1 -Isrc/ares/config_darwin
LINKFLAGS+=-framework CoreServices
OBJS += src/unix/darwin.o
OBJS += src/unix/kqueue.o
Expand Down
3 changes: 3 additions & 0 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ def configure(conf):
conf.env.append_value('CPPFLAGS', '-D_LARGEFILE_SOURCE')
conf.env.append_value('CPPFLAGS', '-D_FILE_OFFSET_BITS=64')

if sys.platform.startswith('darwin'):
conf.env.append_value('CPPFLAGS', '-D_DARWIN_USE_64_BIT_INODE=1')

# Makes select on windows support more than 64 FDs
if sys.platform.startswith("win32"):
conf.env.append_value('CPPFLAGS', '-DFD_SETSIZE=1024');
Expand Down

0 comments on commit ffee873

Please sign in to comment.