Browse Source

LibC: Added _PC_VDISABLE option to fpathconf()

This was needed for vttest
Brandon Scott 5 years ago
parent
commit
fd15c7e8db
2 changed files with 5 additions and 1 deletions
  1. 2 0
      Libraries/LibC/unistd.cpp
  2. 3 1
      Libraries/LibC/unistd.h

+ 2 - 0
Libraries/LibC/unistd.cpp

@@ -412,6 +412,8 @@ long fpathconf(int fd, int name)
     switch (name) {
     case _PC_PATH_MAX:
         return PATH_MAX;
+    case _PC_VDISABLE:
+        return _POSIX_VDISABLE;
     }
 
     ASSERT_NOT_REACHED();

+ 3 - 1
Libraries/LibC/unistd.h

@@ -117,7 +117,8 @@ int umount(const char* mountpoint);
 enum {
     _PC_NAME_MAX,
     _PC_PATH_MAX,
-    _PC_PIPE_BUF
+    _PC_PIPE_BUF,
+    _PC_VDISABLE
 };
 
 #define HOST_NAME_MAX 64
@@ -132,5 +133,6 @@ enum {
  * range of values), but we do have process priorities.
  */
 #define _POSIX_PRIORITY_SCHEDULING
+#define _POSIX_VDISABLE '\0'
 
 __END_DECLS