diff options
Diffstat (limited to 'src/lib9')
-rw-r--r-- | src/lib9/_p9dir.c | 2 | ||||
-rw-r--r-- | src/lib9/getns.c | 5 |
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); |