aboutsummaryrefslogtreecommitdiff
path: root/fw/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/base.c')
-rw-r--r--fw/base.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/fw/base.c b/fw/base.c
new file mode 100644
index 0000000..8c9de6f
--- /dev/null
+++ b/fw/base.c
@@ -0,0 +1,20 @@
+
+#include <unistd.h>
+
+int __errno = 0;
+void *_impure_ptr = NULL;
+
+void __sinit(void) {
+}
+
+void memset(void *s, int c, size_t n) {
+ char *end = (char *)s + n;
+ for (char *p = (char *)s; p < end; p++)
+ *p = (char)c;
+}
+
+size_t strlen(const char *s) {
+ const char *start = s;
+ while (*s++);
+ return s - start - 1;
+}