unix: fix OpenBSD codegen to include F_OK
F_OK is used with access(2), but it was removed for openbsd/amd64 when
generated code was updated to OpenBSD 6.3 in 7f59abf3.
Fixes golang/go#26593
Change-Id: I4a542506b1045f0c860bb3137c4d81149a5e1cae
Reviewed-on: https://go-review.googlesource.com/126635
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
diff --git a/unix/mkerrors.sh b/unix/mkerrors.sh
index cd49cd9..20e4569 100755
--- a/unix/mkerrors.sh
+++ b/unix/mkerrors.sh
@@ -261,6 +261,7 @@
#include <sys/sysctl.h>
#include <sys/termios.h>
#include <sys/ttycom.h>
+#include <sys/unistd.h>
#include <sys/wait.h>
#include <net/bpf.h>
#include <net/if.h>
diff --git a/unix/zerrors_openbsd_amd64.go b/unix/zerrors_openbsd_amd64.go
index acfc664..9710736 100644
--- a/unix/zerrors_openbsd_amd64.go
+++ b/unix/zerrors_openbsd_amd64.go
@@ -472,6 +472,7 @@
F_GETLK = 0x7
F_GETOWN = 0x5
F_ISATTY = 0xb
+ F_OK = 0x0
F_RDLCK = 0x1
F_SETFD = 0x2
F_SETFL = 0x4
diff --git a/unix/zsysnum_openbsd_amd64.go b/unix/zsysnum_openbsd_amd64.go
index 10edff0..bc7fa57 100644
--- a/unix/zsysnum_openbsd_amd64.go
+++ b/unix/zsysnum_openbsd_amd64.go
@@ -116,6 +116,7 @@
SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \
SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, \
+ SYS_UNVEIL = 114 // { int sys_unveil(const char *path, \
SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \
SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
SYS_READV = 120 // { ssize_t sys_readv(int fd, \