Permalink
Browse files

Build fixes for OS X 10.5 Leopard / v0.6 branch / issue#3114

  • Loading branch information...
jdduncan committed Apr 15, 2012
1 parent d03b80b commit 8e7770f38bc5559d070b8f35b3c063b42c24bb8d
Showing with 17 additions and 5 deletions.
  1. +4 −1 node.gyp
  2. +3 −4 src/platform_darwin.cc
  3. +5 −0 src/platform_darwin_proctitle.cc
  4. +5 −0 wscript
View
@@ -172,7 +172,10 @@
]
}],
[ 'OS=="mac"', {
- 'sources': [ 'src/platform_darwin.cc' ],
+ 'sources': [
+ 'src/platform_darwin.cc',
+ 'src/platform_darwin_proctitle.cc'
+ ],
'libraries': [ '-framework Carbon' ],
}],
[ 'OS=="linux"', {
View
@@ -38,14 +38,14 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
-
-
+#include <errno.h>
namespace node {
using namespace v8;
-static char *process_title;
+char *process_title;
+
double Platform::prog_start_time = Platform::GetUptime();
char** Platform::SetupArgs(int argc, char *argv[]) {
@@ -56,7 +56,6 @@ char** Platform::SetupArgs(int argc, char *argv[]) {
// Platform::SetProcessTitle implemented in platform_darwin_proctitle.cc
} // namespace node
-#include "platform_darwin_proctitle.cc"
namespace node {
@@ -36,8 +36,13 @@
#include <err.h>
#endif
+#include "node.h"
+#include "platform.h"
+
namespace node {
+extern char * process_title;
+
void Platform::SetProcessTitle(char *title) {
static int symbol_lookup_status = 0; // 1=ok, 2=unavailable
if (symbol_lookup_status == 2) {
View
@@ -443,6 +443,8 @@ def configure(conf):
if sys.platform.startswith("darwin"):
# used by platform_darwin_*.cc
conf.env.append_value('LINKFLAGS', ['-framework','Carbon'])
+ # define _DARWIN_C_SOURCE to enable SUSv3 UNIX 2003 compatiblity
+ conf.env.append_value('CPPFLAGS', '-D_DARWIN_C_SOURCE')
# cross compile for architecture specified by DEST_CPU
if 'DEST_CPU' in conf.env:
arch = conf.env['DEST_CPU']
@@ -510,6 +512,9 @@ def configure(conf):
Options.options.platform_file = False
conf.env["PLATFORM_FILE"] = "src/platform_none.cc"
+ if sys.platform.startswith("darwin"):
+ conf.env["PLATFORM_FILE"] = "src/platform_darwin.cc src/platform_darwin_proctitle.cc"
+
if conf.env['USE_PROFILING'] == True:
conf.env.append_value('CPPFLAGS', '-pg')
conf.env.append_value('LINKFLAGS', '-pg')

0 comments on commit 8e7770f

Please sign in to comment.