summaryrefslogtreecommitdiffstats
path: root/support/nfs/xio.c
diff options
context:
space:
mode:
Diffstat (limited to 'support/nfs/xio.c')
-rw-r--r--support/nfs/xio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/nfs/xio.c b/support/nfs/xio.c
index 49ee6bc..0a250fc 100644
--- a/support/nfs/xio.c
+++ b/support/nfs/xio.c
@@ -55,7 +55,7 @@ xflock(char *fname, char *type)
struct flock fl = { readonly? F_RDLCK : F_WRLCK, SEEK_SET, 0, 0, 0 };
int fd;
- if ((fd = open(fname, readonly? O_RDONLY : O_RDWR)) < 0) {
+ if ((fd = open(fname, readonly? O_RDONLY : (O_RDWR|O_CREAT))) < 0) {
xlog(L_WARNING, "could not open %s for locking", fname);
return -1;
}