diff options
| author | rsc <devnull@localhost> | 2004-04-20 02:03:38 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-04-20 02:03:38 +0000 |
| commit | a0f1e21ff939612898d63ae2245e47dffc1a8153 (patch) | |
| tree | 581f62db3bad2c54d60cb54b6e577787f55071af /src/lib9p | |
| parent | e637c944febf271252e59742aa108d6e0a527eb7 (diff) | |
| download | plan9port-a0f1e21ff939612898d63ae2245e47dffc1a8153.tar.gz plan9port-a0f1e21ff939612898d63ae2245e47dffc1a8153.zip | |
make things work on SunOS
Diffstat (limited to 'src/lib9p')
| -rw-r--r-- | src/lib9p/file.c | 14 |
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; |
