add strdup for debugging.
diff --git a/src/lib9/mkfile b/src/lib9/mkfile
index bea1165..7ade5b6 100644
--- a/src/lib9/mkfile
+++ b/src/lib9/mkfile
@@ -137,6 +137,7 @@
 	seek.$O\
 	sendfd.$O\
 	sleep.$O\
+	strdup.$O\
 	strecpy.$O\
 	sysfatal.$O\
 	sysname.$O\
diff --git a/src/lib9/strdup.c b/src/lib9/strdup.c
new file mode 100644
index 0000000..5ca3186
--- /dev/null
+++ b/src/lib9/strdup.c
@@ -0,0 +1,17 @@
+#include <u.h>
+#include <libc.h>
+
+char*
+strdup(char *s)
+{
+	char *t;
+	int l;
+
+	l = strlen(s);
+	t = malloc(l+1);
+	if(t == nil)
+		return nil;
+	memmove(t, s, l+1);
+	return t;
+}
+