summaryrefslogtreecommitdiffstats
path: root/src/u_path.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/u_path.c')
-rw-r--r--src/u_path.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/u_path.c b/src/u_path.c
index b43946f..a682a75 100644
--- a/src/u_path.c
+++ b/src/u_path.c
@@ -13,7 +13,9 @@
#include <libft.h>
#include <stddef.h>
#include <dirent.h>
-#include <limits.h>
+#include <linux/limits.h>
+
+/* TODO: ARG_MAX ????? */
#include "s_struct.h"
#include "u_vars.h"
@@ -42,11 +44,11 @@ uint8_t u_search_in_path(char fullpath[],
t_msh *msh)
{
struct dirent *ent;
- char tmp[ARG_MAX];
+ char tmp[131072];
char *tok_path;
DIR *dir;
- if (u_get_var_value(tmp, "$PATH", ARG_MAX, msh) != 0)
+ if (u_get_var_value(tmp, "$PATH", 131072, msh) != 0)
return (1);
tok_path = ft_strtok(tmp, ":");
while (tok_path != NULL)