shithub: 9pro

Download patch

ref: ad1ecd543465375dc5914a34d2ef66dfa59fad76
parent: b95c125ec95154a0a834e10796fdd62eee348c87
author: Sigrid Haflínudóttir <[email protected]>
date: Sun Dec 22 09:32:20 EST 2019

add a note re musl+chroot

--- a/9pex.c
+++ b/9pex.c
@@ -10,6 +10,8 @@
 #include <string.h>
 #include <stdlib.h>
 #include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/select.h>
 #include <unistd.h>
 #include <pwd.h>
 #include <grp.h>
@@ -698,7 +700,10 @@
 
 	used(argc); used(argv);
 
-	rootpath = realpath(".", NULL);
+	if ((rootpath = realpath(".", NULL)) == NULL) {
+		trace("root: %s\n", strerror(errno));
+		return 1;
+	}
 	rootlen = strlen(rootpath);
 
 	in = 0;
--- a/README.md
+++ b/README.md
@@ -10,3 +10,7 @@
 # Why
 
 We can do better.
+
+# Notes/todo
+
+ * chrooting with musl makes `realpath` not work as it requires /proc to be mounted, get rid of `realpath`?