summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/internal/slibtool_spawn_impl.h5
-rw-r--r--src/logic/slbt_exec_link.c5
2 files changed, 5 insertions, 5 deletions
diff --git a/src/internal/slibtool_spawn_impl.h b/src/internal/slibtool_spawn_impl.h
index b376ad8..3966fcb 100644
--- a/src/internal/slibtool_spawn_impl.h
+++ b/src/internal/slibtool_spawn_impl.h
@@ -4,10 +4,15 @@
/* Released under the Standard MIT License; see COPYING.SLIBTOOL. */
/*******************************************************************/
+#include <limits.h>
#include <unistd.h>
#include <stdbool.h>
#include <sys/wait.h>
+#ifndef PATH_MAX
+#define PATH_MAX (_XOPEN_PATH_MAX < 4096) ? 4096 : _XOPEN_PATH_MAX
+#endif
+
#ifndef SLBT_USE_FORK
#ifndef SLBT_USE_VFORK
#ifndef SLBT_USE_POSIX_SPAWN
diff --git a/src/logic/slbt_exec_link.c b/src/logic/slbt_exec_link.c
index 1ef8b77..009a59f 100644
--- a/src/logic/slbt_exec_link.c
+++ b/src/logic/slbt_exec_link.c
@@ -7,7 +7,6 @@
#include <string.h>
#include <stdbool.h>
#include <fcntl.h>
-#include <limits.h>
#include <errno.h>
#include <sys/stat.h>
@@ -25,10 +24,6 @@
/* */
/*******************************************************************/
-#ifndef PATH_MAX
-#define PATH_MAX _XOPEN_PATH_MAX
-#endif
-
static bool slbt_adjust_input_argument(char * arg, bool fpic)
{
char * dot;