projects
/
geeqie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f6bc1d2
)
Fix building whereami on Hurd
author
Andreas Rönnquist
<gusnan@debian.org>
Tue, 7 Dec 2021 00:58:44 +0000
(
01:58
+0100)
committer
Colin Clark
<colin.clark@cclark.uk>
Wed, 29 Dec 2021 12:28:59 +0000
(12:28 +0000)
src/whereami.c
patch
|
blob
|
history
diff --git
a/src/whereami.c
b/src/whereami.c
index
b94ce26
..
fe12eba
100644
(file)
--- a/
src/whereami.c
+++ b/
src/whereami.c
@@
-3,6
+3,10
@@
// by Gregory Pakosz (@gpakosz)
// https://github.com/gpakosz/whereami
// by Gregory Pakosz (@gpakosz)
// https://github.com/gpakosz/whereami
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
// in case you want to #include "whereami.c" in a larger compilation unit
#if !defined(WHEREAMI_H)
#include <whereami.h>
// in case you want to #include "whereami.c" in a larger compilation unit
#if !defined(WHEREAMI_H)
#include <whereami.h>
@@
-160,7
+164,7
@@
int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
return 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)
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
@@
-183,6
+187,10
@@
int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
#endif
#endif
#endif
#endif
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
WAI_FUNCSPEC
int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length)
{
WAI_FUNCSPEC
int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length)
{