diff -r 4e8dd617a1ca -r 10ad7f230f4b scripts/wrapper.c --- a/scripts/wrapper.c Sun Aug 30 19:58:41 2009 +0200 +++ b/scripts/wrapper.c Sat May 22 22:04:31 2010 +0200 @@ -7,6 +7,11 @@ #include #include +#ifdef __APPLE__ +#define LDLP "DYLD_LIBRARY_PATH" +#else +#define LDLP "LD_LIBRARY_PATH" +#endif /* Needed for execve */ extern char **environ; @@ -106,7 +111,7 @@ /* Now add the directory with our runtime libraries to the front of the library search path, LD_LIBRARY_PATH */ - ldlibpath = getenv( "LD_LIBRARY_PATH" ); + ldlibpath = getenv(LDLP); if( ldlibpath ) { basedir = (char*) realloc( basedir, strlen( basedir ) + strlen( ldlibpath ) @@ -115,7 +120,7 @@ strcat( basedir, ldlibpath ); } - if( setenv( "LD_LIBRARY_PATH", basedir, 1 ) ) { + if( setenv( LDLP, basedir, 1 ) ) { errno = ENOMEM; perror( "tool wrapper" ); exit( 1 );