Commit b8b0ec39 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Correct the lock.l_type logic for platforms where O_RDONLY is 0.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1896 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent dd076c25
......@@ -60,7 +60,7 @@ flopen(const char *path, int flags, ...)
va_end(ap);
}
lock.l_type = (flags & O_RDONLY) ? F_RDLCK : F_WRLCK;
lock.l_type = ((flags & O_ACCMODE) == O_RDONLY) ? F_RDLCK : F_WRLCK;
lock.l_start = 0;
lock.l_whence = SEEK_SET;
lock.l_len = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment