summaryrefslogtreecommitdiff
path: root/games/hack/makedefs.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-08-16 17:00:18 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-08-16 17:00:18 +0000
commitf614ad9ddbe518d66af1d345c18ac6c1d4b3ec72 (patch)
tree6f9ff210ef26a86ab8a226b9f1192c11e01eb114 /games/hack/makedefs.c
parent7f4a7535eb888a8b95b0a6c252954d2464a59753 (diff)
use O_* defines for open(2) flags and include fcntl.h
Diffstat (limited to 'games/hack/makedefs.c')
-rw-r--r--games/hack/makedefs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/games/hack/makedefs.c b/games/hack/makedefs.c
index e0567032b1f..1403e284a76 100644
--- a/games/hack/makedefs.c
+++ b/games/hack/makedefs.c
@@ -8,6 +8,7 @@ static char rcsid[] = "$NetBSD: makedefs.c,v 1.4 1995/04/24 12:23:39 cgd Exp $";
#include <stdio.h>
#include <string.h>
+#include <fcntl.h>
/* construct definitions of object constants */
#define LINSZ 1000
@@ -16,6 +17,7 @@ static char rcsid[] = "$NetBSD: makedefs.c,v 1.4 1995/04/24 12:23:39 cgd Exp $";
int fd;
char string[STRSZ];
+int
main(argc, argv)
int argc;
char **argv;
@@ -27,7 +29,7 @@ register char *sp;
(void)fprintf(stderr, "usage: makedefs file\n");
exit(1);
}
- if ((fd = open(argv[1], 0)) < 0) {
+ if ((fd = open(argv[1], O_RDONLY)) < 0) {
perror(argv[1]);
exit(1);
}