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 committed Jun 9, 2024
1 parent 9d39f0e commit 657937d
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 657937d

Please sign in to comment.