summaryrefslogtreecommitdiff
path: root/05/stdc_common.h
diff options
context:
space:
mode:
Diffstat (limited to '05/stdc_common.h')
-rw-r--r--05/stdc_common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/05/stdc_common.h b/05/stdc_common.h
index ad56b4d..16ddcdb 100644
--- a/05/stdc_common.h
+++ b/05/stdc_common.h
@@ -63,4 +63,10 @@ long write(int fd, void *buf, size_t count) {
__syscall(1, fd, buf, count, 0, 0, 0);
}
+size_t strlen(char *s) {
+ char *t = s;
+ while (*t) ++t;
+ return t - s;
+}
+
#endif // _STDC_COMMON_H