Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 8e7770f38bc5559d070b8f35b3c063b42c24bb8d 1 parent d03b80b
@jdduncan authored
View
5 node.gyp
@@ -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
7 src/platform_darwin.cc
@@ -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 {
View
5 src/platform_darwin_proctitle.cc
@@ -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
5 wscript
@@ -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')
Please sign in to comment.
Something went wrong with that request. Please try again.