summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibC/limits.h2
-rw-r--r--Userland/Libraries/LibC/unistd.cpp6
-rw-r--r--Userland/Libraries/LibC/unistd.h3
3 files changed, 9 insertions, 2 deletions
diff --git a/Userland/Libraries/LibC/limits.h b/Userland/Libraries/LibC/limits.h
index cb9954e7ee..69130b67a5 100644
--- a/Userland/Libraries/LibC/limits.h
+++ b/Userland/Libraries/LibC/limits.h
@@ -80,6 +80,8 @@
#define SSIZE_MAX 2147483647
+#define LINK_MAX 4096
+
#ifdef __USE_POSIX
# include <bits/posix1_lim.h>
#endif
diff --git a/Userland/Libraries/LibC/unistd.cpp b/Userland/Libraries/LibC/unistd.cpp
index fa22393b3e..b4f7c76e36 100644
--- a/Userland/Libraries/LibC/unistd.cpp
+++ b/Userland/Libraries/LibC/unistd.cpp
@@ -619,7 +619,7 @@ int mknod(const char* pathname, mode_t mode, dev_t dev)
__RETURN_WITH_ERRNO(rc, rc, -1);
}
-long fpathconf([[maybe_unused]] int fd, [[maybe_unused]] int name)
+long fpathconf([[maybe_unused]] int fd, int name)
{
switch (name) {
case _PC_NAME_MAX:
@@ -628,6 +628,8 @@ long fpathconf([[maybe_unused]] int fd, [[maybe_unused]] int name)
return PATH_MAX;
case _PC_VDISABLE:
return _POSIX_VDISABLE;
+ case _PC_LINK_MAX:
+ return LINK_MAX;
}
VERIFY_NOT_REACHED();
@@ -642,6 +644,8 @@ long pathconf([[maybe_unused]] const char* path, int name)
return PATH_MAX;
case _PC_PIPE_BUF:
return PIPE_BUF;
+ case _PC_LINK_MAX:
+ return LINK_MAX;
}
VERIFY_NOT_REACHED();
diff --git a/Userland/Libraries/LibC/unistd.h b/Userland/Libraries/LibC/unistd.h
index e681ae1b6a..2cdfb4df5c 100644
--- a/Userland/Libraries/LibC/unistd.h
+++ b/Userland/Libraries/LibC/unistd.h
@@ -121,7 +121,8 @@ enum {
_PC_NAME_MAX,
_PC_PATH_MAX,
_PC_PIPE_BUF,
- _PC_VDISABLE
+ _PC_VDISABLE,
+ _PC_LINK_MAX
};
#define _POSIX_MONOTONIC_CLOCK 200112L