Skip to content

Commit

Permalink
Define a fallback PATH_MAX if not available
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pinotree authored and chqrlie committed Jul 21, 2024
1 parent 8624b5c commit 012451d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quickjs-libc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 012451d

Please sign in to comment.