Browse Source

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.

Fixes #2061. Solution proposed by Paddy Byers.
v0.7.4-release
Ben Noordhuis 13 years ago
parent
commit
f004d5aeac
  1. 5
      wscript

5
wscript

@ -461,6 +461,11 @@ def configure(conf):
conf.env.append_value('CPPFLAGS', '-D_LARGEFILE_SOURCE') conf.env.append_value('CPPFLAGS', '-D_LARGEFILE_SOURCE')
conf.env.append_value('CPPFLAGS', '-D_FILE_OFFSET_BITS=64') 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') and conf.env['DEST_CPU'] == 'x64':
conf.env.append_value('CPPFLAGS', '-D__DARWIN_64_BIT_INO_T=1')
# Makes select on windows support more than 64 FDs # Makes select on windows support more than 64 FDs
if sys.platform.startswith("win32"): if sys.platform.startswith("win32"):
conf.env.append_value('CPPFLAGS', '-DFD_SETSIZE=1024'); conf.env.append_value('CPPFLAGS', '-DFD_SETSIZE=1024');

Loading…
Cancel
Save