summaryrefslogtreecommitdiff
path: root/games/hack/hack.unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/hack/hack.unix.c')
-rw-r--r--games/hack/hack.unix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/games/hack/hack.unix.c b/games/hack/hack.unix.c
index 18502de172c..f0eef097307 100644
--- a/games/hack/hack.unix.c
+++ b/games/hack/hack.unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hack.unix.c,v 1.15 2014/11/16 04:49:48 guenther Exp $ */
+/* $OpenBSD: hack.unix.c,v 1.16 2015/11/11 01:12:10 deraadt Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -286,7 +286,7 @@ getlock()
error(locknum ? "Too many hacks running now."
: "There is a game in progress under your name.");
gotlock:
- fd = creat(lock, FMASK);
+ fd = open(lock, O_CREAT | O_TRUNC | O_WRONLY, FMASK);
if(unlink(LLOCK) == -1)
error("Cannot unlink %s.", LLOCK);
if(fd == -1) {