add this
diff --git a/src/lib9/sysname.c b/src/lib9/sysname.c
new file mode 100644
index 0000000..775b609
--- /dev/null
+++ b/src/lib9/sysname.c
@@ -0,0 +1,23 @@
+#include <u.h>
+#include <libc.h>
+
+char*
+sysname(void)
+{
+	char buf[300], *p, *q;
+
+	if((q = getenv("sysname")) == nil){
+		if(gethostname(buf, sizeof buf) < 0)
+			goto err;
+		buf[sizeof buf-1] = 0;
+		q = strdup(buf);
+		if(q == nil)
+			goto err;
+	}
+	if((p = strchr(q, '.')) != nil)
+		*p = 0;
+	return q;
+
+err:
+	return "gnot";
+}