mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-22 02:53:06 +00:00
Fallback to _POSIX_PATH_MAX when MAXPATHLEN isn't available (#130)
On systems where MAXPATHLEN isn't defined, like GNU/Hurd, use _POSIX_PATH_MAX as the starting size for the getcwd() buffer.
This commit is contained in:
committed by
Hisham Muhammad
parent
1dfb8c41e8
commit
04bdaf9a1e
@@ -60,7 +60,12 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
#include <sys/param.h> /* for MAXPATHLEN */
|
#include <sys/param.h> /* for MAXPATHLEN */
|
||||||
#define LFS_MAXPATHLEN MAXPATHLEN
|
#ifdef MAXPATHLEN
|
||||||
|
#define LFS_MAXPATHLEN MAXPATHLEN
|
||||||
|
#else
|
||||||
|
#include <limits.h> /* for _POSIX_PATH_MAX */
|
||||||
|
#define LFS_MAXPATHLEN _POSIX_PATH_MAX
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <lua.h>
|
#include <lua.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user