aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/unix/mkerrors.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/unix/mkerrors.sh')
-rw-r--r--vendor/golang.org/x/sys/unix/mkerrors.sh95
1 files changed, 84 insertions, 11 deletions
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 6ffac92..a47b035 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -54,22 +54,28 @@ includes_AIX='
includes_Darwin='
#define _DARWIN_C_SOURCE
-#define KERNEL
+#define KERNEL 1
#define _DARWIN_USE_64_BIT_INODE
+#define __APPLE_USE_RFC_3542
#include <stdint.h>
#include <sys/attr.h>
+#include <sys/clonefile.h>
+#include <sys/kern_control.h>
#include <sys/types.h>
#include <sys/event.h>
#include <sys/ptrace.h>
#include <sys/select.h>
#include <sys/socket.h>
+#include <sys/un.h>
#include <sys/sockio.h>
+#include <sys/sys_domain.h>
#include <sys/sysctl.h>
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/utsname.h>
#include <sys/wait.h>
#include <sys/xattr.h>
+#include <sys/vsock.h>
#include <net/bpf.h>
#include <net/if.h>
#include <net/if_types.h>
@@ -77,6 +83,9 @@ includes_Darwin='
#include <netinet/in.h>
#include <netinet/ip.h>
#include <termios.h>
+
+// for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
+#define TIOCREMOTE 0x80047469
'
includes_DragonFly='
@@ -93,6 +102,7 @@ includes_DragonFly='
#include <sys/ioctl.h>
#include <net/bpf.h>
#include <net/if.h>
+#include <net/if_clone.h>
#include <net/if_types.h>
#include <net/route.h>
#include <netinet/in.h>
@@ -105,9 +115,12 @@ includes_FreeBSD='
#include <sys/capsicum.h>
#include <sys/param.h>
#include <sys/types.h>
+#include <sys/disk.h>
#include <sys/event.h>
+#include <sys/sched.h>
#include <sys/select.h>
#include <sys/socket.h>
+#include <sys/un.h>
#include <sys/sockio.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
@@ -186,22 +199,28 @@ struct ltchars {
#include <sys/select.h>
#include <sys/signalfd.h>
#include <sys/socket.h>
+#include <sys/timerfd.h>
#include <sys/uio.h>
#include <sys/xattr.h>
#include <linux/bpf.h>
#include <linux/can.h>
+#include <linux/can/error.h>
+#include <linux/can/raw.h>
#include <linux/capability.h>
#include <linux/cryptouser.h>
#include <linux/devlink.h>
+#include <linux/dm-ioctl.h>
#include <linux/errqueue.h>
+#include <linux/ethtool_netlink.h>
#include <linux/falloc.h>
#include <linux/fanotify.h>
#include <linux/filter.h>
#include <linux/fs.h>
#include <linux/fscrypt.h>
+#include <linux/fsverity.h>
#include <linux/genetlink.h>
#include <linux/hdreg.h>
-#include <linux/icmpv6.h>
+#include <linux/hidraw.h>
#include <linux/if.h>
#include <linux/if_addr.h>
#include <linux/if_alg.h>
@@ -211,17 +230,23 @@ struct ltchars {
#include <linux/if_tun.h>
#include <linux/if_packet.h>
#include <linux/if_xdp.h>
+#include <linux/input.h>
#include <linux/kexec.h>
#include <linux/keyctl.h>
+#include <linux/landlock.h>
#include <linux/loop.h>
+#include <linux/lwtunnel.h>
#include <linux/magic.h>
#include <linux/memfd.h>
#include <linux/module.h>
+#include <linux/mount.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netlink.h>
#include <linux/net_namespace.h>
+#include <linux/nfc.h>
#include <linux/nsfs.h>
#include <linux/perf_event.h>
+#include <linux/pps.h>
#include <linux/ptrace.h>
#include <linux/random.h>
#include <linux/reboot.h>
@@ -236,8 +261,10 @@ struct ltchars {
#include <linux/vm_sockets.h>
#include <linux/wait.h>
#include <linux/watchdog.h>
+#include <linux/wireguard.h>
#include <mtd/ubi-user.h>
+#include <mtd/mtd-user.h>
#include <net/route.h>
#if defined(__sparc__)
@@ -280,6 +307,22 @@ struct ltchars {
// for the tipc_subscr timeout __u32 field.
#undef TIPC_WAIT_FOREVER
#define TIPC_WAIT_FOREVER 0xffffffff
+
+// Copied from linux/l2tp.h
+// Including linux/l2tp.h here causes conflicts between linux/in.h
+// and netinet/in.h included via net/route.h above.
+#define IPPROTO_L2TP 115
+
+// Copied from linux/hid.h.
+// Keep in sync with the size of the referenced fields.
+#define _HIDIOCGRAWNAME_LEN 128 // sizeof_field(struct hid_device, name)
+#define _HIDIOCGRAWPHYS_LEN 64 // sizeof_field(struct hid_device, phys)
+#define _HIDIOCGRAWUNIQ_LEN 64 // sizeof_field(struct hid_device, uniq)
+
+#define _HIDIOCGRAWNAME HIDIOCGRAWNAME(_HIDIOCGRAWNAME_LEN)
+#define _HIDIOCGRAWPHYS HIDIOCGRAWPHYS(_HIDIOCGRAWPHYS_LEN)
+#define _HIDIOCGRAWUNIQ HIDIOCGRAWUNIQ(_HIDIOCGRAWUNIQ_LEN)
+
'
includes_NetBSD='
@@ -289,6 +332,7 @@ includes_NetBSD='
#include <sys/extattr.h>
#include <sys/mman.h>
#include <sys/mount.h>
+#include <sys/sched.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/sockio.h>
@@ -317,6 +361,7 @@ includes_OpenBSD='
#include <sys/mman.h>
#include <sys/mount.h>
#include <sys/select.h>
+#include <sys/sched.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/stat.h>
@@ -357,6 +402,7 @@ includes_SunOS='
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/stat.h>
+#include <sys/stream.h>
#include <sys/mman.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
@@ -366,10 +412,11 @@ includes_SunOS='
#include <net/if_arp.h>
#include <net/if_types.h>
#include <net/route.h>
+#include <netinet/icmp6.h>
#include <netinet/in.h>
-#include <termios.h>
#include <netinet/ip.h>
#include <netinet/ip_mroute.h>
+#include <termios.h>
'
@@ -424,6 +471,7 @@ ccflags="$@"
$2 !~ /^EPROC_/ &&
$2 !~ /^EQUIV_/ &&
$2 !~ /^EXPR_/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 /^_?HIDIOC/ ||
+ $2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ ||
+ $2 ~ /^MTD/ ||
+ $2 ~ /^OTP/ ||
+ $2 ~ /^MEM/ ||
+ $2 ~ /^WG/ ||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
@@ -573,6 +645,7 @@ echo '#include <signal.h>' | $CC -x c - -E -dM $ccflags |
echo '// mkerrors.sh' "$@"
echo '// Code generated by the command above; see README.md. DO NOT EDIT.'
echo
+echo "//go:build ${GOARCH} && ${GOOS}"
echo "// +build ${GOARCH},${GOOS}"
echo
go tool cgo -godefs -- "$@" _const.go >_error.out