⛏️ index : buildtools.git

author François Revol <revol@free.fr> 2009-12-05 21:01:40.0 +00:00:00
committer François Revol <revol@free.fr> 2009-12-05 21:01:40.0 +00:00:00
commit
1c3ec1efb71fd9fae1a029d92b6d162a1921209b [patch]
tree
6bd2a18cfe16458e175fb3bb51a47e0e69987f2d
parent
15d161b97e69765e54bef9a2f30d75afba428f7a
download
1c3ec1efb71fd9fae1a029d92b6d162a1921209b.tar.gz

Fix for #4885 (jam crashing in OSX 64bit). The prototype for getcwd() was missing, so defaulting to int as return type, cutting the address to 32bit. We probably want to include unistd.h for other OSes too...

git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@34515 a95241bf-73f2-0310-859d-f6bbb57e9c96

Diff

 jam/pathunix.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/jam/pathunix.c b/jam/pathunix.c
index ef0ac61..6a3df2b 100644
--- a/jam/pathunix.c
+++ b/jam/pathunix.c
@@ -38,6 +38,12 @@

# ifdef USE_PATHUNIX

# if defined( OS_MACOSX )

/* need unistd for the prototype for getcwd to avoid defaulting return to int on 64bit */
/* XXX: others too ? */
# include <unistd.h>
# endif

/*
 * path_parse() - split a file name into dir/base/suffix/member
 */