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

Commit

Permalink
build: compile with -D__DARWIN_64_BIT_INO_T on OS X
Browse files Browse the repository at this point in the history
Fixes a struct stat size mismatch on 64 bits machines that made Node crash with
a EXC_BAD_ACCESS on startup.

Fixes #2061. Solution proposed by Paddy Byers.
  • Loading branch information
bnoordhuis committed Nov 18, 2011
1 parent 1e34c85 commit 8bed0a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wscript
Expand Up @@ -461,6 +461,11 @@ def configure(conf):
conf.env.append_value('CPPFLAGS', '-D_LARGEFILE_SOURCE')
conf.env.append_value('CPPFLAGS', '-D_FILE_OFFSET_BITS=64')

# Apparently _LARGEFILE_SOURCE and _FILE_OFFSET_BITS isn't always enough
# on OS X, see https://github.com/joyent/node/issues/2061 for details.
if sys.platform.startswith('darwin'):
conf.env.append_value('CPPFLAGS', '-D__DARWIN_64_BIT_INO_T=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 8bed0a3

Please sign in to comment.