summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/syscalls.h5
-rw-r--r--src/shared/types.h10
2 files changed, 11 insertions, 4 deletions
diff --git a/src/shared/syscalls.h b/src/shared/syscalls.h
index 36588b6..2c1648e 100644
--- a/src/shared/syscalls.h
+++ b/src/shared/syscalls.h
@@ -1,10 +1,7 @@
#pragma once
+#include <shared/types.h>
#include <stddef.h>
-#ifndef TYPES_INCLUDED
-# error "please include <kernel/types.h> or <init/types.h> before this file"
-#endif
-
typedef int handle_t;
enum {
diff --git a/src/shared/types.h b/src/shared/types.h
new file mode 100644
index 0000000..5dd39ad
--- /dev/null
+++ b/src/shared/types.h
@@ -0,0 +1,10 @@
+#pragma once
+#include <stdint.h>
+
+#ifdef __CHECKER__
+# define __user __attribute__((noderef, address_space(__user)))
+#else
+# define __user
+#endif
+
+typedef void __user * userptr_t;