fix compilation on OSX

This commit is contained in:
Maxime Coste 2012-07-30 14:12:49 +02:00
parent 1833cb4dcf
commit 217b3d2bce

View File

@ -581,7 +581,7 @@ void exec_commands_in_runtime_file(const CommandParameters& params,
assert(res != -1);
buffer[res] = '\0';
#elif defined(__APPLE__)
uint32_t bufsize = 2048 - filename.length();
uint32_t bufsize = 2048 - (int)filename.length();
_NSGetExecutablePath(buffer, &bufsize);
char* canonical_path = realpath(buffer, NULL);
strncpy(buffer, canonical_path, 2048 - (int)filename.length());