aboutsummaryrefslogtreecommitdiff
path: root/src/lib9
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2007-11-27 15:39:06 -0500
committerRuss Cox <rsc@swtch.com>2007-11-27 15:39:06 -0500
commit83ab7d88962d717ca5729e7337706b6e4da48af6 (patch)
tree2dcaeba8fec383733357f4db5e9c2d0718767838 /src/lib9
parent00a8743cd85fcb605a06382387ac526e7fe8bf36 (diff)
parent00a8743cd85fcb605a06382387ac526e7fe8bf36 (diff)
downloadplan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.tar.gz
plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.tar.bz2
plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.zip
merge
Diffstat (limited to 'src/lib9')
-rw-r--r--src/lib9/_p9dir.c2
-rw-r--r--src/lib9/getns.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/lib9/_p9dir.c b/src/lib9/_p9dir.c
index 60c9b10c..05f4db9a 100644
--- a/src/lib9/_p9dir.c
+++ b/src/lib9/_p9dir.c
@@ -252,7 +252,7 @@ _p9dir(struct stat *lst, struct stat *st, char *name, Dir *d, char **str, char *
close(fd);
}
#endif
-#if defined(__FreeBSD__)
+#if defined(DIOCGMEDIASIZE)
if(isdisk(st)){
int fd;
off_t mediasize;
diff --git a/src/lib9/getns.c b/src/lib9/getns.c
index 923efc75..6c221eed 100644
--- a/src/lib9/getns.c
+++ b/src/lib9/getns.c
@@ -42,6 +42,11 @@ nsfromdisplay(void)
if(strcmp(p, ".0") == 0)
*p = 0;
}
+
+ /* turn /tmp/launch/:0 into _tmp_launch_:0 (OS X 10.5) */
+ for(p=disp; *p; p++)
+ if(*p == '/')
+ *p = '_';
p = smprint("/tmp/ns.%s.%s", getuser(), disp);
free(disp);