Thanks to Pino Toscano (GitHub user pinotree) for the pull request.
This closes GitHub PR #137.
Gbp-Pq: Name hurd.patch
return OFgetModulePath_(NULL, out, capacity, dirname_length);
}
-#elif defined(__linux__) || defined(__CYGWIN__) || defined(__sun) || defined(WAI_USE_PROC_SELF_EXE)
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(__sun) || defined(__GNU__) || defined(WAI_USE_PROC_SELF_EXE)
#include <stdio.h>
#include <stdlib.h>
#endif
#endif
+#if !defined(PATH_MAX)
+#define PATH_MAX 1024
+#endif
+
int OFgetExecutablePath(char* out, int capacity, int* dirname_length)
{