diff --git a/Libraries/LibC/unistd.cpp b/Libraries/LibC/unistd.cpp index 9c8f7e07aa..f87d52e672 100644 --- a/Libraries/LibC/unistd.cpp +++ b/Libraries/LibC/unistd.cpp @@ -413,6 +413,12 @@ long fpathconf(int fd, int name) { (void)fd; (void)name; + + switch (name) { + case _PC_PATH_MAX: + return PATH_MAX; + } + ASSERT_NOT_REACHED(); } @@ -420,6 +426,12 @@ long pathconf(const char* path, int name) { (void)path; (void)name; + + switch (name) { + case _PC_PATH_MAX: + return PATH_MAX; + } + ASSERT_NOT_REACHED(); } diff --git a/Libraries/LibC/unistd.h b/Libraries/LibC/unistd.h index 08cadfb408..3ae7eb1634 100644 --- a/Libraries/LibC/unistd.h +++ b/Libraries/LibC/unistd.h @@ -107,6 +107,7 @@ char* realpath(const char* pathname, char* buffer); enum { _PC_NAME_MAX, + _PC_PATH_MAX, }; #define HOST_NAME_MAX 64