aboutsummaryrefslogtreecommitdiff
path: root/src/kern/stdlibrepl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kern/stdlibrepl.c')
-rw-r--r--src/kern/stdlibrepl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/kern/stdlibrepl.c b/src/kern/stdlibrepl.c
new file mode 100644
index 0000000..2d9d839
--- /dev/null
+++ b/src/kern/stdlibrepl.c
@@ -0,0 +1,13 @@
+/*
+ * Replacement for common stdlib functions that don't exist
+ * on the ARM bare-metal compilation environment.
+ */
+
+#include <stddef.h>
+
+size_t strlen(char* ch)
+{
+ size_t ret = 0;
+ while(*(ch ++) != 0) ++ ret;
+ return ret;
+}