From 012451d5f3c8e88457e0c37b30f997d9d5b0782f Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Sun, 9 Jun 2024 09:23:49 +0200 Subject: [PATCH] Define a fallback PATH_MAX if not available PATH_MAX is optional in POSIX, and it is not available on GNU/Hurd. While it could be possible to not rely on PATH_MAX, for now provide a fallback definition (which should be safe enough) to get quickjs built on GNU/Hurd. --- quickjs-libc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quickjs-libc.c b/quickjs-libc.c index 40482a5..141f79f 100644 --- a/quickjs-libc.c +++ b/quickjs-libc.c @@ -78,6 +78,10 @@ typedef sig_t sighandler_t; #include "list.h" #include "quickjs-libc.h" +#if !defined(PATH_MAX) +#define PATH_MAX 4096 +#endif + /* TODO: - add socket calls */