--- /dev/null
+#include <string.h>\r
+#include <stdlib.h>\r
+\r
+char *strdup(const char *s) {\r
+ char *ns = NULL;\r
+ size_t len;\r
+\r
+ if (s) {\r
+ len = strlen(s) + 1;\r
+ ns = malloc(len);\r
+ if (ns)\r
+ strncpy(ns, s, len);\r
+ }\r
+ return ns;\r
+}\r