Skip to content
Browse files

Fix crash on x86_64 due to implicit definition of dirname function. A…

…dded proper include to fix that.
  • Loading branch information...
1 parent a9a5f4c commit 8a7d46ef277e0392b15b616c518cc0884d00ce69 @cuberoot cuberoot committed with tlrobinson Mar 17, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 narwhal.c
View
2 narwhal.c
@@ -1,6 +1,7 @@
#define NOTRACE
#include <narwhal.h>
+#include <libgen.h>
//#ifdef WEBKIT
@@ -322,6 +323,7 @@ JSValueRef narwhal_wrapped(JSGlobalContextRef _context, JSValueRef *_exception,
// glibc's dirname modifies it's argument so copy first
char tmp[1024];
strcpy(tmp, executable);
+ char * foo = (char *)dirname(tmp);
strcpy(NARWHAL_ENGINE_HOME, (char *)dirname((char *)dirname(tmp)));
}

0 comments on commit 8a7d46e

Please sign in to comment.
Something went wrong with that request. Please try again.