Skip to content

Commit

Permalink
added support for kFreeBSD and GNU Hurd
Browse files Browse the repository at this point in the history
  • Loading branch information
yangfl committed Apr 9, 2020
1 parent 6a8536a commit 472e0f6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/whereami.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
return 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)

#define _GNU_SOURCE

#include <stdio.h>
#include <stdlib.h>
Expand All @@ -181,6 +183,10 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
#endif
#endif

#ifndef PATH_MAX
#define PATH_MAX 4096
#endif

WAI_FUNCSPEC
int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length)
{
Expand Down

0 comments on commit 472e0f6

Please sign in to comment.