Skip to content

Commit 012451d

Browse files
pinotreechqrlie
authored andcommitted
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.
1 parent 8624b5c commit 012451d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

quickjs-libc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ typedef sig_t sighandler_t;
7878
#include "list.h"
7979
#include "quickjs-libc.h"
8080

81+
#if !defined(PATH_MAX)
82+
#define PATH_MAX 4096
83+
#endif
84+
8185
/* TODO:
8286
- add socket calls
8387
*/

0 commit comments

Comments
 (0)