summaryrefslogtreecommitdiff
path: root/net/net_sys_linux.h
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-27 01:43:43 +0200
committerMiguel <m.i@gmx.at>2018-09-27 01:43:43 +0200
commit330aa15e3e4a705eb8d168bc9c76af9b1b768dfc (patch)
treebe3412953a872dc3ad43217d45009f28d4607966 /net/net_sys_linux.h
parentc7bf9cc575dea15ecc8780afd34ffb3503f3249b (diff)
user space compilation of fool stack
Diffstat (limited to 'net/net_sys_linux.h')
-rw-r--r--net/net_sys_linux.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/net_sys_linux.h b/net/net_sys_linux.h
new file mode 100644
index 0000000..2f6b62a
--- /dev/null
+++ b/net/net_sys_linux.h
@@ -0,0 +1,17 @@
+/**
+ * @file
+ *
+ * this has to be provided and linked against the fool stack
+ */
+
+#include <stdio.h> // provides printf for klog below
+#include <malloc.h> // provides malloc & free for kbfree & kballoc below
+#include <string.h> // provides memcpy
+
+//void* memcpy(void* restrict dstptr, const void* restrict srcptr, int size);
+//#define klog(...) log(FOOLOS_LOG_COLOR,__FILE__ ":" S2(__LINE__), 10, LOG_LABEL_INFO __VA_ARGS__)
+#define S1(x) #x
+#define S2(x) S1(x)
+#define klog(...) printf(__FILE__ ":" S2(__LINE__) __VA_ARGS__)
+#define kbfree(x) free(x);
+#define kballoc(x) malloc(x*4096);