summaryrefslogtreecommitdiff
path: root/src/user/lib/include/sys
diff options
context:
space:
mode:
authordzwdz2022-09-02 23:56:18 +0200
committerdzwdz2022-09-02 23:56:18 +0200
commit6e4b9831f903e583d58de8b4265159f6d859ebc2 (patch)
tree9e941257df8898356d605a7f3398aa09d9b00ec9 /src/user/lib/include/sys
parente7770ccc0fab8f3a4b65bf2f7a1a11ad453f77e4 (diff)
user/ports: bare minimum to run doomgeneric
Diffstat (limited to 'src/user/lib/include/sys')
-rw-r--r--src/user/lib/include/sys/stat.h8
-rw-r--r--src/user/lib/include/sys/types.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/user/lib/include/sys/stat.h b/src/user/lib/include/sys/stat.h
index a954c9b..78a8fc1 100644
--- a/src/user/lib/include/sys/stat.h
+++ b/src/user/lib/include/sys/stat.h
@@ -1,4 +1,5 @@
#pragma once
+#include <sys/types.h>
#include <errno.h> // only for ENOSYS
#define S_ISFIFO(x) 0
@@ -9,3 +10,10 @@ static inline int fstat(int fd, struct stat *sb) {
errno = ENOSYS;
return -1;
}
+
+static inline int mkdir(const char *path, mode_t mode) {
+ // TODO
+ (void)path; (void)mode;
+ errno = ENOSYS;
+ return -1;
+}
diff --git a/src/user/lib/include/sys/types.h b/src/user/lib/include/sys/types.h
index 3b1772b..9f6f8f8 100644
--- a/src/user/lib/include/sys/types.h
+++ b/src/user/lib/include/sys/types.h
@@ -5,3 +5,4 @@
typedef long long off_t;
typedef int64_t time_t;
typedef uint64_t clock_t;
+typedef int mode_t;