aboutsummaryrefslogtreecommitdiff
path: root/src/lib9p
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-04-20 02:03:38 +0000
committerrsc <devnull@localhost>2004-04-20 02:03:38 +0000
commita0f1e21ff939612898d63ae2245e47dffc1a8153 (patch)
tree581f62db3bad2c54d60cb54b6e577787f55071af /src/lib9p
parente637c944febf271252e59742aa108d6e0a527eb7 (diff)
downloadplan9port-a0f1e21ff939612898d63ae2245e47dffc1a8153.tar.gz
plan9port-a0f1e21ff939612898d63ae2245e47dffc1a8153.tar.bz2
plan9port-a0f1e21ff939612898d63ae2245e47dffc1a8153.zip
make things work on SunOS
Diffstat (limited to 'src/lib9p')
-rw-r--r--src/lib9p/file.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib9p/file.c b/src/lib9p/file.c
index 79a8a11d..6259a9ce 100644
--- a/src/lib9p/file.c
+++ b/src/lib9p/file.c
@@ -254,6 +254,18 @@ walkfile(File *f, char *path)
free(os);
return f;
}
+
+static Qid
+mkqid(vlong path, long vers, int type)
+{
+ Qid q;
+
+ q.path = path;
+ q.vers = vers;
+ q.type = type;
+ return q;
+}
+
Tree*
alloctree(char *uid, char *gid, ulong mode, void (*destroy)(File*))
@@ -281,7 +293,7 @@ alloctree(char *uid, char *gid, ulong mode, void (*destroy)(File*))
muid = estrdup9p(uid);
- f->dir.qid = (Qid){0, 0, QTDIR};
+ f->dir.qid = mkqid(0, 0, QTDIR);
f->dir.length = 0;
f->dir.atime = f->dir.mtime = time(0);
f->dir.mode = DMDIR | mode;