diff options
Diffstat (limited to '')
-rw-r--r-- | src/config.h | 8 | ||||
-rw-r--r-- | src/mds-server.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/config.h b/src/config.h index 6d38a14..da3ff81 100644 --- a/src/config.h +++ b/src/config.h @@ -118,6 +118,14 @@ /** + * The path of the symlink to the executed command + */ +#ifndef SELF_EXE +#define SELF_EXE "/proc/self/exe" +#endif + + +/** * The maximum number of command line arguments to allow */ #ifndef ARGC_LIMIT diff --git a/src/mds-server.c b/src/mds-server.c index eb35daf..d0259f3 100644 --- a/src/mds-server.c +++ b/src/mds-server.c @@ -349,7 +349,7 @@ int main(int argc_, char** argv_) close(pipe_rw[1]); /* Re-exec the server. */ - readlink_ptr = readlink("/proc/self/exe", readlink_buf, PATH_MAX - 1); + readlink_ptr = readlink(SELF_EXE, readlink_buf, PATH_MAX - 1); if (readlink_ptr < 0) goto reexec_fail; /* ‘readlink() does not append a null byte to buf.’ */ |