r1896 - trunk/varnish-cache/lib/libvarnish
des at projects.linpro.no
des at projects.linpro.no
Mon Aug 20 17:18:49 CEST 2007
Author: des
Date: 2007-08-20 17:18:49 +0200 (Mon, 20 Aug 2007)
New Revision: 1896
Modified:
trunk/varnish-cache/lib/libvarnish/flopen.c
Log:
Correct the lock.l_type logic for platforms where O_RDONLY is 0.
Modified: trunk/varnish-cache/lib/libvarnish/flopen.c
===================================================================
--- trunk/varnish-cache/lib/libvarnish/flopen.c 2007-08-20 12:45:58 UTC (rev 1895)
+++ trunk/varnish-cache/lib/libvarnish/flopen.c 2007-08-20 15:18:49 UTC (rev 1896)
@@ -60,7 +60,7 @@
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;
More information about the varnish-commit
mailing list