golang.org/x/sys/unix/zerrors_openbsd_* and friends are seriously out of date on some archs; zerrors for 386 must have been generated on openbsd 5.7 or earlier; arm and amd64 somewhere between 5.8 and 6.0. (I bumped into this trying to build something which wants O_CLOEXEC but fails on i386).
How can we go about getting these updated upstream so that there's a chance they'll eventually trickle down to projects using vendored copies? Here are diffs against the current files for i386 to give an example of how far they've diverged. I have updated files for i386/amd64 and will soon have them for aarch64 if they're any use... Index: patches/patch-src_syscall_mkerrors_sh =================================================================== RCS file: patches/patch-src_syscall_mkerrors_sh diff -N patches/patch-src_syscall_mkerrors_sh --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_syscall_mkerrors_sh 15 Dec 2022 13:09:36 -0000 @@ -0,0 +1,23 @@ +This script is broken by the API warnings output during compilation. + +Index: src/syscall/mkerrors.sh +--- src/syscall/mkerrors.sh.orig ++++ src/syscall/mkerrors.sh +@@ -426,7 +426,7 @@ main(void) + e = errors[i]; + if(i > 0 && errors[i-1] == e) + continue; +- strcpy(buf, strerror(e)); ++ strncpy(buf, strerror(e), 1024); + // lowercase first letter: Bad -> bad, but STREAM -> STREAM. + if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) + buf[0] += a - A; +@@ -441,7 +441,7 @@ main(void) + e = signals[i]; + if(i > 0 && signals[i-1] == e) + continue; +- strcpy(buf, strsignal(e)); ++ strncpy(buf, strsignal(e), 1024); + // lowercase first letter: Bad -> bad, but STREAM -> STREAM. + if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) + buf[0] += a - A; Index: patches/patch-src_syscall_zerrors_openbsd_386_go =================================================================== RCS file: patches/patch-src_syscall_zerrors_openbsd_386_go diff -N patches/patch-src_syscall_zerrors_openbsd_386_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_syscall_zerrors_openbsd_386_go 15 Dec 2022 13:10:26 -0000 @@ -0,0 +1,770 @@ +Index: src/syscall/zerrors_openbsd_386.go +--- src/syscall/zerrors_openbsd_386.go.orig ++++ src/syscall/zerrors_openbsd_386.go +@@ -1,7 +1,7 @@ + // mkerrors.sh -m32 + // Code generated by the command above; DO NOT EDIT. + +-// Created by cgo -godefs - DO NOT EDIT ++// Code generated by cmd/cgo -godefs; DO NOT EDIT. + // cgo -godefs -- -m32 _const.go + + //go:build 386 && openbsd +@@ -105,6 +105,15 @@ const ( + BPF_DIRECTION_IN = 0x1 + BPF_DIRECTION_OUT = 0x2 + BPF_DIV = 0x30 ++ BPF_FILDROP_CAPTURE = 0x1 ++ BPF_FILDROP_DROP = 0x2 ++ BPF_FILDROP_PASS = 0x0 ++ BPF_F_DIR_IN = 0x10 ++ BPF_F_DIR_MASK = 0x30 ++ BPF_F_DIR_OUT = 0x20 ++ BPF_F_DIR_SHIFT = 0x4 ++ BPF_F_FLOWID = 0x8 ++ BPF_F_PRI_MASK = 0x7 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 +@@ -133,6 +142,7 @@ const ( + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 ++ BPF_RND = 0xc0 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 +@@ -173,6 +183,7 @@ const ( + DLT_LOOP = 0xc + DLT_MPLS = 0xdb + DLT_NULL = 0x0 ++ DLT_OPENFLOW = 0x10b + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 +@@ -183,6 +194,23 @@ const ( + DLT_RAW = 0xe + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf ++ DLT_USBPCAP = 0xf9 ++ DLT_USER0 = 0x93 ++ DLT_USER1 = 0x94 ++ DLT_USER10 = 0x9d ++ DLT_USER11 = 0x9e ++ DLT_USER12 = 0x9f ++ DLT_USER13 = 0xa0 ++ DLT_USER14 = 0xa1 ++ DLT_USER15 = 0xa2 ++ DLT_USER2 = 0x95 ++ DLT_USER3 = 0x96 ++ DLT_USER4 = 0x97 ++ DLT_USER5 = 0x98 ++ DLT_USER6 = 0x99 ++ DLT_USER7 = 0x9a ++ DLT_USER8 = 0x9b ++ DLT_USER9 = 0x9c + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 +@@ -202,6 +230,8 @@ const ( + EMUL_ENABLED = 0x1 + EMUL_NATIVE = 0x2 + ENDRUNDISC = 0x9 ++ ETH64_8021_RSVD_MASK = 0xfffffffffff0 ++ ETH64_8021_RSVD_PREFIX = 0x180c2000000 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERTYPE_8023 = 0x4 +@@ -254,6 +284,7 @@ const ( + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 ++ ETHERTYPE_EAPOL = 0x888e + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d +@@ -285,6 +316,7 @@ const ( + ETHERTYPE_LLDP = 0x88cc + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 ++ ETHERTYPE_MACSEC = 0x88e5 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c +@@ -313,15 +345,17 @@ const ( + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 ++ ETHERTYPE_NHRP = 0x2001 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 ++ ETHERTYPE_NSH = 0x984f + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 +- ETHERTYPE_PAE = 0x888e ++ ETHERTYPE_PBB = 0x88e7 + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b +@@ -396,28 +430,40 @@ const ( + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_DIX_LEN = 0x600 ++ ETHER_MAX_HARDMTU_LEN = 0xff9b + ETHER_MAX_LEN = 0x5ee + ETHER_MIN_LEN = 0x40 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = -0x3 ++ EVFILT_DEVICE = -0x8 ++ EVFILT_EXCEPT = -0x9 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 +- EVFILT_SYSCOUNT = 0x7 ++ EVFILT_SYSCOUNT = 0x9 + EVFILT_TIMER = -0x7 + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 ++ EVL_ENCAPLEN = 0x4 ++ EVL_PRIO_BITS = 0xd ++ EVL_PRIO_MAX = 0x7 ++ EVL_VLID_MASK = 0xfff ++ EVL_VLID_MAX = 0xffe ++ EVL_VLID_MIN = 0x1 ++ EVL_VLID_NULL = 0x0 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 ++ EV_DISPATCH = 0x80 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 +- EV_SYSFLAGS = 0xf000 ++ EV_RECEIPT = 0x40 ++ EV_SYSFLAGS = 0xf800 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 +@@ -430,7 +476,7 @@ const ( + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETOWN = 0x5 +- F_OK = 0x0 ++ F_ISATTY = 0xb + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 +@@ -446,7 +492,6 @@ const ( + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 +- IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8e52 +@@ -457,12 +502,12 @@ const ( + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 +- IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 ++ IFF_STATICARP = 0x20 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 +@@ -591,6 +636,7 @@ const ( + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 ++ IFT_MBIM = 0xfa + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 +@@ -681,6 +727,7 @@ const ( + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 ++ IFT_WIREGUARD = 0xfb + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 +@@ -715,8 +762,6 @@ const ( + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DIVERT = 0x102 +- IPPROTO_DIVERT_INIT = 0x2 +- IPPROTO_DIVERT_RESP = 0x1 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 +@@ -748,9 +793,11 @@ const ( + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e ++ IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 ++ IPPROTO_UDPLITE = 0x88 + IPV6_AUTH_LEVEL = 0x35 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_CHECKSUM = 0x1a +@@ -773,6 +820,7 @@ const ( + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff ++ IPV6_MINHOPCOUNT = 0x41 + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 +@@ -812,12 +860,12 @@ const ( + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 +- IP_DIVERTFL = 0x1022 + IP_DROP_MEMBERSHIP = 0xd + IP_ESP_NETWORK_LEVEL = 0x16 + IP_ESP_TRANS_LEVEL = 0x15 + IP_HDRINCL = 0x2 + IP_IPCOMP_LEVEL = 0x1d ++ IP_IPDEFTTL = 0x25 + IP_IPSECFLOWINFO = 0x24 + IP_IPSEC_LOCAL_AUTH = 0x1b + IP_IPSEC_LOCAL_CRED = 0x19 +@@ -851,6 +899,7 @@ const ( + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RTABLE = 0x1021 ++ IP_SENDSRCADDR = 0x7 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 +@@ -871,22 +920,25 @@ const ( + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ANON = 0x1000 +- MAP_COPY = 0x4 ++ MAP_ANONYMOUS = 0x1000 ++ MAP_CONCEAL = 0x8000 ++ MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 +- MAP_FLAGMASK = 0x1ff7 +- MAP_HASSEMAPHORE = 0x200 +- MAP_INHERIT = 0x80 ++ MAP_FLAGMASK = 0xfff7 ++ MAP_HASSEMAPHORE = 0x0 ++ MAP_INHERIT = 0x0 + MAP_INHERIT_COPY = 0x1 +- MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 +- MAP_NOEXTEND = 0x100 +- MAP_NORESERVE = 0x40 ++ MAP_INHERIT_ZERO = 0x3 ++ MAP_NOEXTEND = 0x0 ++ MAP_NORESERVE = 0x0 + MAP_PRIVATE = 0x2 +- MAP_RENAME = 0x20 ++ MAP_RENAME = 0x0 + MAP_SHARED = 0x1 +- MAP_TRYFIXED = 0x400 ++ MAP_STACK = 0x4000 ++ MAP_TRYFIXED = 0x0 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_BCAST = 0x100 +@@ -901,6 +953,7 @@ const ( + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 ++ MSG_WAITFORONE = 0x1000 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x4 + MS_SYNC = 0x2 +@@ -908,11 +961,14 @@ const ( + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 +- NET_RT_MAXID = 0x6 ++ NET_RT_IFNAMES = 0x6 ++ NET_RT_MAXID = 0x8 ++ NET_RT_SOURCE = 0x7 + NET_RT_STATS = 0x4 + NET_RT_TABLE = 0x5 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 ++ NOTE_CHANGE = 0x1 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EOF = 0x2 +@@ -922,6 +978,7 @@ const ( + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 ++ NOTE_OOB = 0x4 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 +@@ -969,7 +1026,6 @@ const ( + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 +- PT_MASK = 0x3ff000 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 +@@ -978,19 +1034,25 @@ const ( + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 ++ RTAX_BFD = 0xb + RTAX_BRD = 0x7 ++ RTAX_DNS = 0xc + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_LABEL = 0xa +- RTAX_MAX = 0xb ++ RTAX_MAX = 0xf + RTAX_NETMASK = 0x2 ++ RTAX_SEARCH = 0xe + RTAX_SRC = 0x8 + RTAX_SRCMASK = 0x9 ++ RTAX_STATIC = 0xd + RTA_AUTHOR = 0x40 ++ RTA_BFD = 0x800 + RTA_BRD = 0x80 ++ RTA_DNS = 0x1000 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 +@@ -998,49 +1060,57 @@ const ( + RTA_IFP = 0x10 + RTA_LABEL = 0x400 + RTA_NETMASK = 0x4 ++ RTA_SEARCH = 0x4000 + RTA_SRC = 0x100 + RTA_SRCMASK = 0x200 ++ RTA_STATIC = 0x2000 + RTF_ANNOUNCE = 0x4000 ++ RTF_BFD = 0x1000000 + RTF_BLACKHOLE = 0x1000 ++ RTF_BROADCAST = 0x400000 ++ RTF_CACHED = 0x20000 + RTF_CLONED = 0x10000 + RTF_CLONING = 0x100 ++ RTF_CONNECTED = 0x800000 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 +- RTF_FMASK = 0x10f808 ++ RTF_FMASK = 0x110fc08 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 +- RTF_MASK = 0x80 ++ RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MPATH = 0x40000 + RTF_MPLS = 0x100000 ++ RTF_MULTICAST = 0x200 + RTF_PERMANENT_ARP = 0x2000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x2000 + RTF_REJECT = 0x8 +- RTF_SOURCE = 0x20000 + RTF_STATIC = 0x800 +- RTF_TUNNEL = 0x100000 + RTF_UP = 0x1 + RTF_USETRAILERS = 0x8000 +- RTF_XRESOLVE = 0x200 ++ RTM_80211INFO = 0x15 + RTM_ADD = 0x1 ++ RTM_BFD = 0x12 + RTM_CHANGE = 0x3 ++ RTM_CHGADDRATTR = 0x14 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DESYNC = 0x10 + RTM_GET = 0x4 + RTM_IFANNOUNCE = 0xf + RTM_IFINFO = 0xe +- RTM_LOCK = 0x8 ++ RTM_INVALIDATE = 0x11 + RTM_LOSING = 0x5 + RTM_MAXSIZE = 0x800 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc ++ RTM_PROPOSAL = 0x13 + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb +- RTM_RTTUNIT = 0xf4240 ++ RTM_SOURCE = 0x16 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 +@@ -1050,6 +1120,8 @@ const ( + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 ++ RT_TABLEID_BITS = 0x8 ++ RT_TABLEID_MASK = 0xff + RT_TABLEID_MAX = 0xff + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 +@@ -1062,55 +1134,57 @@ const ( + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80246987 +- SIOCALIFADDR = 0x8218691c + SIOCATMARK = 0x40047307 +- SIOCBRDGADD = 0x8054693c +- SIOCBRDGADDS = 0x80546941 +- SIOCBRDGARL = 0x806e694d ++ SIOCBRDGADD = 0x805c693c ++ SIOCBRDGADDL = 0x805c6949 ++ SIOCBRDGADDS = 0x805c6941 ++ SIOCBRDGARL = 0x808c694d + SIOCBRDGDADDR = 0x81286947 +- SIOCBRDGDEL = 0x8054693d +- SIOCBRDGDELS = 0x80546942 +- SIOCBRDGFLUSH = 0x80546948 +- SIOCBRDGFRL = 0x806e694e ++ SIOCBRDGDEL = 0x805c693d ++ SIOCBRDGDELS = 0x805c6942 ++ SIOCBRDGFLUSH = 0x805c6948 ++ SIOCBRDGFRL = 0x808c694e + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 +- SIOCBRDGGIFFLGS = 0xc054693e ++ SIOCBRDGGIFFLGS = 0xc05c693e + SIOCBRDGGMA = 0xc0146953 + SIOCBRDGGPARAM = 0xc03c6958 + SIOCBRDGGPRI = 0xc0146950 + SIOCBRDGGRL = 0xc028694f +- SIOCBRDGGSIFS = 0xc054693c + SIOCBRDGGTO = 0xc0146946 +- SIOCBRDGIFS = 0xc0546942 ++ SIOCBRDGIFS = 0xc05c6942 + SIOCBRDGRTS = 0xc0186943 + SIOCBRDGSADDR = 0xc1286944 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 +- SIOCBRDGSIFCOST = 0x80546955 +- SIOCBRDGSIFFLGS = 0x8054693f +- SIOCBRDGSIFPRIO = 0x80546954 ++ SIOCBRDGSIFCOST = 0x805c6955 ++ SIOCBRDGSIFFLGS = 0x805c693f ++ SIOCBRDGSIFPRIO = 0x805c6954 ++ SIOCBRDGSIFPROT = 0x805c694a + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 ++ SIOCDELLABEL = 0x80206997 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80246989 ++ SIOCDIFPARENT = 0x802069b4 + SIOCDIFPHYADDR = 0x80206949 +- SIOCDLIFADDR = 0x8218691e ++ SIOCDPWE3NEIGHBOR = 0x802069de ++ SIOCDVNETID = 0x802069af + SIOCGETKALIVE = 0xc01869a4 + SIOCGETLABEL = 0x8020699a ++ SIOCGETMPWCFG = 0xc02069ae + SIOCGETPFLOW = 0xc02069fe + SIOCGETPFSYNC = 0xc02069f8 + SIOCGETSGCNT = 0xc0147534 + SIOCGETVIFCNT = 0xc0147533 + SIOCGETVLAN = 0xc0206990 +- SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 +- SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCONF = 0xc0086924 + SIOCGIFDATA = 0xc020691b +@@ -1119,40 +1193,53 @@ const ( + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGATTR = 0xc024698b + SIOCGIFGENERIC = 0xc020693a ++ SIOCGIFGLIST = 0xc024698d + SIOCGIFGMEMB = 0xc024698a + SIOCGIFGROUP = 0xc0246988 + SIOCGIFHARDMTU = 0xc02069a5 +- SIOCGIFMEDIA = 0xc0286936 ++ SIOCGIFLLPRIO = 0xc02069b6 ++ SIOCGIFMEDIA = 0xc0386938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc020697e + SIOCGIFNETMASK = 0xc0206925 +- SIOCGIFPDSTADDR = 0xc0206948 ++ SIOCGIFPAIR = 0xc02069b1 ++ SIOCGIFPARENT = 0xc02069b3 + SIOCGIFPRIORITY = 0xc020699c +- SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFRDOMAIN = 0xc02069a0 + SIOCGIFRTLABEL = 0xc0206983 +- SIOCGIFTIMESLOT = 0xc0206986 ++ SIOCGIFRXR = 0x802069aa ++ SIOCGIFSFFPAGE = 0xc1126939 + SIOCGIFXFLAGS = 0xc020699e +- SIOCGLIFADDR = 0xc218691d + SIOCGLIFPHYADDR = 0xc218694b ++ SIOCGLIFPHYDF = 0xc02069c2 ++ SIOCGLIFPHYECN = 0xc02069c8 + SIOCGLIFPHYRTABLE = 0xc02069a2 + SIOCGLIFPHYTTL = 0xc02069a9 +- SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 ++ SIOCGPWE3 = 0xc0206998 ++ SIOCGPWE3CTRLWORD = 0xc02069dc ++ SIOCGPWE3FAT = 0xc02069dd ++ SIOCGPWE3NEIGHBOR = 0xc21869de ++ SIOCGRXHPRIO = 0xc02069db + SIOCGSPPPPARAMS = 0xc0206994 ++ SIOCGTXHPRIO = 0xc02069c6 ++ SIOCGUMBINFO = 0xc02069be ++ SIOCGUMBPARAM = 0xc02069c0 + SIOCGVH = 0xc02069f6 ++ SIOCGVNETFLOWID = 0xc02069c4 + SIOCGVNETID = 0xc02069a7 ++ SIOCIFAFATTACH = 0x801169ab ++ SIOCIFAFDETACH = 0x801169ac + SIOCIFCREATE = 0x8020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSETKALIVE = 0x801869a3 + SIOCSETLABEL = 0x80206999 ++ SIOCSETMPWCFG = 0x802069ad + SIOCSETPFLOW = 0x802069fd + SIOCSETPFSYNC = 0x802069f7 + SIOCSETVLAN = 0x8020698f +- SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c +- SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFDESCR = 0x80206980 + SIOCSIFDSTADDR = 0x8020690e +@@ -1160,26 +1247,36 @@ const ( + SIOCSIFGATTR = 0x8024698c + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020691f +- SIOCSIFMEDIA = 0xc0206935 ++ SIOCSIFLLPRIO = 0x802069b5 ++ SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x8020697f + SIOCSIFNETMASK = 0x80206916 +- SIOCSIFPHYADDR = 0x80406946 ++ SIOCSIFPAIR = 0x802069b0 ++ SIOCSIFPARENT = 0x802069b2 + SIOCSIFPRIORITY = 0x8020699b + SIOCSIFRDOMAIN = 0x8020699f + SIOCSIFRTLABEL = 0x80206982 +- SIOCSIFTIMESLOT = 0x80206985 + SIOCSIFXFLAGS = 0x8020699d + SIOCSLIFPHYADDR = 0x8218694a ++ SIOCSLIFPHYDF = 0x802069c1 ++ SIOCSLIFPHYECN = 0x802069c7 + SIOCSLIFPHYRTABLE = 0x802069a1 + SIOCSLIFPHYTTL = 0x802069a8 +- SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 ++ SIOCSPWE3CTRLWORD = 0x802069dc ++ SIOCSPWE3FAT = 0x802069dd ++ SIOCSPWE3NEIGHBOR = 0x821869de ++ SIOCSRXHPRIO = 0x802069db + SIOCSSPPPPARAMS = 0x80206993 ++ SIOCSTXHPRIO = 0x802069c5 ++ SIOCSUMBPARAM = 0x802069bf + SIOCSVH = 0xc02069f5 ++ SIOCSVNETFLOWID = 0x802069c3 + SIOCSVNETID = 0x802069a6 + SOCK_CLOEXEC = 0x8000 + SOCK_DGRAM = 0x2 ++ SOCK_DNS = 0x1000 + SOCK_NONBLOCK = 0x4000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 +@@ -1191,6 +1288,7 @@ const ( + SO_BINDANY = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 ++ SO_DOMAIN = 0x1024 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 +@@ -1198,6 +1296,7 @@ const ( + SO_NETPROC = 0x1020 + SO_OOBINLINE = 0x100 + SO_PEERCRED = 0x1022 ++ SO_PROTOCOL = 0x1025 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 +@@ -1211,10 +1310,11 @@ const ( + SO_TIMESTAMP = 0x800 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 ++ SO_ZEROIZE = 0x2000 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 +- TCP_MAXBURST = 0x4 ++ TCP_INFO = 0x9 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x3 +@@ -1223,11 +1323,13 @@ const ( + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOPUSH = 0x10 +- TCP_NSTATES = 0xb ++ TCP_SACKHOLE_LIMIT = 0x80 + TCP_SACK_ENABLE = 0x8 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 ++ TIOCCHKVERAUTH = 0x2000741e ++ TIOCCLRVERAUTH = 0x2000741d + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d +@@ -1282,16 +1384,18 @@ const ( + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b ++ TIOCSETVERAUTH = 0x8004741c + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x8004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e +- TIOCSTAT = 0x80047465 +- TIOCSTI = 0x80017472 ++ TIOCSTAT = 0x20007465 + TIOCSTOP = 0x2000746f + TIOCSTSTAMP = 0x8008745a + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 ++ TIOCUCNTL_CBRK = 0x7a ++ TIOCUCNTL_SBRK = 0x7b + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb +@@ -1314,8 +1418,10 @@ const ( + WALTSIG = 0x4 + WCONTINUED = 0x8 + WCOREFLAG = 0x80 ++ WEXITED = 0x4 + WNOHANG = 0x1 +- WSTOPPED = 0x7f ++ WNOWAIT = 0x10 ++ WSTOPPED = 0x2 + WUNTRACED = 0x2 + ) + +@@ -1330,6 +1436,7 @@ const ( + EALREADY = Errno(0x25) + EAUTH = Errno(0x50) + EBADF = Errno(0x9) ++ EBADMSG = Errno(0x5c) + EBADRPC = Errno(0x48) + EBUSY = Errno(0x10) + ECANCELED = Errno(0x58) +@@ -1356,7 +1463,7 @@ const ( + EIPSEC = Errno(0x52) + EISCONN = Errno(0x38) + EISDIR = Errno(0x15) +- ELAST = Errno(0x5b) ++ ELAST = Errno(0x5f) + ELOOP = Errno(0x3e) + EMEDIUMTYPE = Errno(0x56) + EMFILE = Errno(0x18) +@@ -1384,12 +1491,14 @@ const ( + ENOTCONN = Errno(0x39) + ENOTDIR = Errno(0x14) + ENOTEMPTY = Errno(0x42) ++ ENOTRECOVERABLE = Errno(0x5d) + ENOTSOCK = Errno(0x26) + ENOTSUP = Errno(0x5b) + ENOTTY = Errno(0x19) + ENXIO = Errno(0x6) + EOPNOTSUPP = Errno(0x2d) + EOVERFLOW = Errno(0x57) ++ EOWNERDEAD = Errno(0x5e) + EPERM = Errno(0x1) + EPFNOSUPPORT = Errno(0x2e) + EPIPE = Errno(0x20) +@@ -1397,6 +1506,7 @@ const ( + EPROCUNAVAIL = Errno(0x4c) + EPROGMISMATCH = Errno(0x4b) + EPROGUNAVAIL = Errno(0x4a) ++ EPROTO = Errno(0x5f) + EPROTONOSUPPORT = Errno(0x2b) + EPROTOTYPE = Errno(0x29) + ERANGE = Errno(0x22) +@@ -1514,7 +1624,7 @@ var errors = [...]string{ + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", +- 60: "connection timed out", ++ 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", +@@ -1523,12 +1633,12 @@ var errors = [...]string{ + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", +- 69: "disc quota exceeded", ++ 69: "disk quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", +- 74: "RPC prog. not avail", ++ 74: "RPC program not available", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", +@@ -1546,6 +1656,10 @@ var errors = [...]string{ + 89: "identifier removed", + 90: "no message of desired type", + 91: "not supported", ++ 92: "bad message", ++ 93: "state not recoverable", ++ 94: "previous owner died", ++ 95: "protocol error", + } + + // Signal table +@@ -1566,8 +1680,8 @@ var signals = [...]string{ + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", +- 17: "stopped (signal)", +- 18: "stopped", ++ 17: "suspended (signal)", ++ 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", Index: patches/patch-src_syscall_zsysnum_openbsd_386_go =================================================================== RCS file: patches/patch-src_syscall_zsysnum_openbsd_386_go diff -N patches/patch-src_syscall_zsysnum_openbsd_386_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_syscall_zsysnum_openbsd_386_go 15 Dec 2022 13:10:26 -0000 @@ -0,0 +1,433 @@ +Index: src/syscall/zsysnum_openbsd_386.go +--- src/syscall/zsysnum_openbsd_386.go.orig ++++ src/syscall/zsysnum_openbsd_386.go +@@ -6,204 +6,229 @@ + package syscall + + const ( +- SYS_EXIT = 1 // { void sys_exit(int rval); } +- SYS_FORK = 2 // { int sys_fork(void); } +- SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); } +- SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \ +- SYS_OPEN = 5 // { int sys_open(const char *path, \ +- SYS_CLOSE = 6 // { int sys_close(int fd); } +- SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \ +- SYS_LINK = 9 // { int sys_link(const char *path, const char *link); } +- SYS_UNLINK = 10 // { int sys_unlink(const char *path); } +- SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \ +- SYS_CHDIR = 12 // { int sys_chdir(const char *path); } +- SYS_FCHDIR = 13 // { int sys_fchdir(int fd); } +- SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \ +- SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); } +- SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \ +- SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break +- SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } +- SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \ +- SYS_GETPID = 20 // { pid_t sys_getpid(void); } +- SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \ +- SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); } +- SYS_SETUID = 23 // { int sys_setuid(uid_t uid); } +- SYS_GETUID = 24 // { uid_t sys_getuid(void); } +- SYS_GETEUID = 25 // { uid_t sys_geteuid(void); } +- SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ +- SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ +- SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \ +- SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ +- SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \ +- SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \ +- SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \ +- SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); } +- SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); } +- SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); } +- SYS_SYNC = 36 // { void sys_sync(void); } +- SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); } +- SYS_GETPPID = 39 // { pid_t sys_getppid(void); } +- SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); } +- SYS_DUP = 41 // { int sys_dup(int fd); } +- SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \ +- SYS_GETEGID = 43 // { gid_t sys_getegid(void); } +- SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \ +- SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \ +- SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \ +- SYS_GETGID = 47 // { gid_t sys_getgid(void); } +- SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } +- SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); } +- SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); } +- SYS_ACCT = 51 // { int sys_acct(const char *path); } +- SYS_SIGPENDING = 52 // { int sys_sigpending(void); } +- SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); } +- SYS_IOCTL = 54 // { int sys_ioctl(int fd, \ +- SYS_REBOOT = 55 // { int sys_reboot(int opt); } +- SYS_REVOKE = 56 // { int sys_revoke(const char *path); } +- SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \ +- SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \ +- SYS_EXECVE = 59 // { int sys_execve(const char *path, \ +- SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); } +- SYS_CHROOT = 61 // { int sys_chroot(const char *path); } +- SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ +- SYS_STATFS = 63 // { int sys_statfs(const char *path, \ +- SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } +- SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \ +- SYS_VFORK = 66 // { int sys_vfork(void); } +- SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \ +- SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \ +- SYS_SETITIMER = 69 // { int sys_setitimer(int which, \ +- SYS_GETITIMER = 70 // { int sys_getitimer(int which, \ +- SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \ +- SYS_KEVENT = 72 // { int sys_kevent(int fd, \ +- SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); } +- SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \ +- SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \ +- SYS_UTIMES = 76 // { int sys_utimes(const char *path, \ +- SYS_FUTIMES = 77 // { int sys_futimes(int fd, \ +- SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \ +- SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \ +- SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \ +- SYS_GETPGRP = 81 // { int sys_getpgrp(void); } +- SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); } +- SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \ +- SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \ +- SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \ +- SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \ +- SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \ +- SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } +- SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \ +- SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } +- SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, \ +- SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \ +- SYS_FSYNC = 95 // { int sys_fsync(int fd); } +- SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); } +- SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); } +- SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \ +- SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); } +- SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); } +- SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); } +- SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } +- SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \ +- SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \ +- SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); } +- SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \ +- SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ +- SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } +- SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \ +- SYS_READV = 120 // { ssize_t sys_readv(int fd, \ +- SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \ +- SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); } +- SYS_KILL = 122 // { int sys_kill(int pid, int signum); } +- SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); } +- SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); } +- SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); } +- SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); } +- SYS_FLOCK = 131 // { int sys_flock(int fd, int how); } +- SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); } +- SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \ +- SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); } +- SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \ +- SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); } +- SYS_RMDIR = 137 // { int sys_rmdir(const char *path); } +- SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \ +- SYS_SETSID = 147 // { int sys_setsid(void); } +- SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \ +- SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); } +- SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); } +- SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); } +- SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \ +- SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \ +- SYS_SETGID = 181 // { int sys_setgid(gid_t gid); } +- SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); } +- SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); } +- SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); } +- SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); } +- SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); } +- SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \ +- SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \ +- SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \ +- SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \ +- SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \ +- SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); } +- SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \ +- SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); } +- SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); } +- SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } +- SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \ +- SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); } +- SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); } +- SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \ +- SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ +- SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \ +- SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); } +- SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \ +- SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \ +- SYS_ISSETUGID = 253 // { int sys_issetugid(void); } +- SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); } +- SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); } +- SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); } +- SYS_PIPE = 263 // { int sys_pipe(int *fdp); } +- SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); } +- SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \ +- SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \ +- SYS_KQUEUE = 269 // { int sys_kqueue(void); } +- SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); } +- SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); } +- SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \ +- SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \ +- SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \ +- SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \ +- SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \ +- SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } +- SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \ +- SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); } +- SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \ +- SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \ +- SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \ +- SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \ +- SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \ +- SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); } +- SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); } +- SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \ +- SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } +- SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \ +- SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } +- SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \ +- SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); } +- SYS_GETRTABLE = 311 // { int sys_getrtable(void); } +- SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \ +- SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \ +- SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \ +- SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \ +- SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \ +- SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \ +- SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \ +- SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \ +- SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \ +- SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \ +- SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \ +- SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \ +- SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } +- SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } ++ SYS_EXIT = 1; // { void sys_exit(int rval); } ++ SYS_FORK = 2; // { int sys_fork(void); } ++ SYS_READ = 3; // { ssize_t sys_read(int fd, void *buf, size_t nbyte); } ++ SYS_WRITE = 4; // { ssize_t sys_write(int fd, const void *buf, \ ++ SYS_OPEN = 5; // { int sys_open(const char *path, \ ++ SYS_CLOSE = 6; // { int sys_close(int fd); } ++ SYS_GETENTROPY = 7; // { int sys_getentropy(void *buf, size_t nbyte); } ++ SYS___TFORK = 8; // { int sys___tfork(const struct __tfork *param, \ ++ SYS_LINK = 9; // { int sys_link(const char *path, const char *link); } ++ SYS_UNLINK = 10; // { int sys_unlink(const char *path); } ++ SYS_WAIT4 = 11; // { pid_t sys_wait4(pid_t pid, int *status, \ ++ SYS_CHDIR = 12; // { int sys_chdir(const char *path); } ++ SYS_FCHDIR = 13; // { int sys_fchdir(int fd); } ++ SYS_MKNOD = 14; // { int sys_mknod(const char *path, mode_t mode, \ ++ SYS_CHMOD = 15; // { int sys_chmod(const char *path, mode_t mode); } ++ SYS_CHOWN = 16; // { int sys_chown(const char *path, uid_t uid, \ ++ SYS_OBREAK = 17; // { int sys_obreak(char *nsize); } break ++ SYS_GETDTABLECOUNT = 18; // { int sys_getdtablecount(void); } ++ SYS_GETRUSAGE = 19; // { int sys_getrusage(int who, \ ++ SYS_GETPID = 20; // { pid_t sys_getpid(void); } ++ SYS_MOUNT = 21; // { int sys_mount(const char *type, const char *path, \ ++ SYS_UNMOUNT = 22; // { int sys_unmount(const char *path, int flags); } ++ SYS_SETUID = 23; // { int sys_setuid(uid_t uid); } ++ SYS_GETUID = 24; // { uid_t sys_getuid(void); } ++ SYS_GETEUID = 25; // { uid_t sys_geteuid(void); } ++ SYS_PTRACE = 26; // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ ++ SYS_RECVMSG = 27; // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ ++ SYS_SENDMSG = 28; // { ssize_t sys_sendmsg(int s, \ ++ SYS_RECVFROM = 29; // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ ++ SYS_ACCEPT = 30; // { int sys_accept(int s, struct sockaddr *name, \ ++ SYS_GETPEERNAME = 31; // { int sys_getpeername(int fdes, struct sockaddr *asa, \ ++ SYS_GETSOCKNAME = 32; // { int sys_getsockname(int fdes, struct sockaddr *asa, \ ++ SYS_ACCESS = 33; // { int sys_access(const char *path, int amode); } ++ SYS_CHFLAGS = 34; // { int sys_chflags(const char *path, u_int flags); } ++ SYS_FCHFLAGS = 35; // { int sys_fchflags(int fd, u_int flags); } ++ SYS_SYNC = 36; // { void sys_sync(void); } ++ SYS_MSYSCALL = 37; // { int sys_msyscall(void *addr, size_t len); } ++ SYS_STAT = 38; // { int sys_stat(const char *path, struct stat *ub); } ++ SYS_GETPPID = 39; // { pid_t sys_getppid(void); } ++ SYS_LSTAT = 40; // { int sys_lstat(const char *path, struct stat *ub); } ++ SYS_DUP = 41; // { int sys_dup(int fd); } ++ SYS_FSTATAT = 42; // { int sys_fstatat(int fd, const char *path, \ ++ SYS_GETEGID = 43; // { gid_t sys_getegid(void); } ++ SYS_PROFIL = 44; // { int sys_profil(caddr_t samples, size_t size, \ ++ SYS_KTRACE = 45; // { int sys_ktrace(const char *fname, int ops, \ ++ SYS_SIGACTION = 46; // { int sys_sigaction(int signum, \ ++ SYS_GETGID = 47; // { gid_t sys_getgid(void); } ++ SYS_SIGPROCMASK = 48; // { int sys_sigprocmask(int how, sigset_t mask); } ++ SYS_MMAP = 49; // { void *sys_mmap(void *addr, size_t len, int prot, \ ++ SYS_SETLOGIN = 50; // { int sys_setlogin(const char *namebuf); } ++ SYS_ACCT = 51; // { int sys_acct(const char *path); } ++ SYS_SIGPENDING = 52; // { int sys_sigpending(void); } ++ SYS_FSTAT = 53; // { int sys_fstat(int fd, struct stat *sb); } ++ SYS_IOCTL = 54; // { int sys_ioctl(int fd, \ ++ SYS_REBOOT = 55; // { int sys_reboot(int opt); } ++ SYS_REVOKE = 56; // { int sys_revoke(const char *path); } ++ SYS_SYMLINK = 57; // { int sys_symlink(const char *path, \ ++ SYS_READLINK = 58; // { ssize_t sys_readlink(const char *path, \ ++ SYS_EXECVE = 59; // { int sys_execve(const char *path, \ ++ SYS_UMASK = 60; // { mode_t sys_umask(mode_t newmask); } ++ SYS_CHROOT = 61; // { int sys_chroot(const char *path); } ++ SYS_GETFSSTAT = 62; // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ ++ SYS_STATFS = 63; // { int sys_statfs(const char *path, \ ++ SYS_FSTATFS = 64; // { int sys_fstatfs(int fd, struct statfs *buf); } ++ SYS_FHSTATFS = 65; // { int sys_fhstatfs(const fhandle_t *fhp, \ ++ SYS_VFORK = 66; // { int sys_vfork(void); } ++ SYS_GETTIMEOFDAY = 67; // { int sys_gettimeofday(struct timeval *tp, \ ++ SYS_SETTIMEOFDAY = 68; // { int sys_settimeofday(const struct timeval *tv, \ ++ SYS_SETITIMER = 69; // { int sys_setitimer(int which, \ ++ SYS_GETITIMER = 70; // { int sys_getitimer(int which, \ ++ SYS_SELECT = 71; // { int sys_select(int nd, fd_set *in, fd_set *ou, \ ++ SYS_KEVENT = 72; // { int sys_kevent(int fd, \ ++ SYS_MUNMAP = 73; // { int sys_munmap(void *addr, size_t len); } ++ SYS_MPROTECT = 74; // { int sys_mprotect(void *addr, size_t len, \ ++ SYS_MADVISE = 75; // { int sys_madvise(void *addr, size_t len, \ ++ SYS_UTIMES = 76; // { int sys_utimes(const char *path, \ ++ SYS_FUTIMES = 77; // { int sys_futimes(int fd, \ ++ SYS_MQUERY = 78; // { void *sys_mquery(void *addr, size_t len, int prot, \ ++ SYS_GETGROUPS = 79; // { int sys_getgroups(int gidsetsize, \ ++ SYS_SETGROUPS = 80; // { int sys_setgroups(int gidsetsize, \ ++ SYS_GETPGRP = 81; // { int sys_getpgrp(void); } ++ SYS_SETPGID = 82; // { int sys_setpgid(pid_t pid, pid_t pgid); } ++ SYS_FUTEX = 83; // { int sys_futex(uint32_t *f, int op, int val, \ ++ SYS_UTIMENSAT = 84; // { int sys_utimensat(int fd, const char *path, \ ++ SYS_FUTIMENS = 85; // { int sys_futimens(int fd, \ ++ SYS_KBIND = 86; // { int sys_kbind(const struct __kbind *param, \ ++ SYS_CLOCK_GETTIME = 87; // { int sys_clock_gettime(clockid_t clock_id, \ ++ SYS_CLOCK_SETTIME = 88; // { int sys_clock_settime(clockid_t clock_id, \ ++ SYS_CLOCK_GETRES = 89; // { int sys_clock_getres(clockid_t clock_id, \ ++ SYS_DUP2 = 90; // { int sys_dup2(int from, int to); } ++ SYS_NANOSLEEP = 91; // { int sys_nanosleep(const struct timespec *rqtp, \ ++ SYS_FCNTL = 92; // { int sys_fcntl(int fd, int cmd, ... void *arg); } ++ SYS_ACCEPT4 = 93; // { int sys_accept4(int s, struct sockaddr *name, \ ++ SYS___THRSLEEP = 94; // { int sys___thrsleep(const volatile void *ident, \ ++ SYS_FSYNC = 95; // { int sys_fsync(int fd); } ++ SYS_SETPRIORITY = 96; // { int sys_setpriority(int which, id_t who, int prio); } ++ SYS_SOCKET = 97; // { int sys_socket(int domain, int type, int protocol); } ++ SYS_CONNECT = 98; // { int sys_connect(int s, const struct sockaddr *name, \ ++ SYS_GETDENTS = 99; // { int sys_getdents(int fd, void *buf, size_t buflen); } ++ SYS_GETPRIORITY = 100; // { int sys_getpriority(int which, id_t who); } ++ SYS_PIPE2 = 101; // { int sys_pipe2(int *fdp, int flags); } ++ SYS_DUP3 = 102; // { int sys_dup3(int from, int to, int flags); } ++ SYS_SIGRETURN = 103; // { int sys_sigreturn(struct sigcontext *sigcntxp); } ++ SYS_BIND = 104; // { int sys_bind(int s, const struct sockaddr *name, \ ++ SYS_SETSOCKOPT = 105; // { int sys_setsockopt(int s, int level, int name, \ ++ SYS_LISTEN = 106; // { int sys_listen(int s, int backlog); } ++ SYS_CHFLAGSAT = 107; // { int sys_chflagsat(int fd, const char *path, \ ++ SYS_PLEDGE = 108; // { int sys_pledge(const char *promises, \ ++ SYS_PPOLL = 109; // { int sys_ppoll(struct pollfd *fds, \ ++ 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___REALPATH = 115; // { int sys___realpath(const char *pathname, \ ++ SYS_RECVMMSG = 116; // { int sys_recvmmsg(int s, struct mmsghdr *mmsg, \ ++ SYS_SENDMMSG = 117; // { int sys_sendmmsg(int s, struct mmsghdr *mmsg,\ ++ 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, \ ++ SYS_WRITEV = 121; // { ssize_t sys_writev(int fd, \ ++ SYS_KILL = 122; // { int sys_kill(int pid, int signum); } ++ SYS_FCHOWN = 123; // { int sys_fchown(int fd, uid_t uid, gid_t gid); } ++ SYS_FCHMOD = 124; // { int sys_fchmod(int fd, mode_t mode); } ++ SYS_SETREUID = 126; // { int sys_setreuid(uid_t ruid, uid_t euid); } ++ SYS_SETREGID = 127; // { int sys_setregid(gid_t rgid, gid_t egid); } ++ SYS_RENAME = 128; // { int sys_rename(const char *from, const char *to); } ++ SYS_FLOCK = 131; // { int sys_flock(int fd, int how); } ++ SYS_MKFIFO = 132; // { int sys_mkfifo(const char *path, mode_t mode); } ++ SYS_SENDTO = 133; // { ssize_t sys_sendto(int s, const void *buf, \ ++ SYS_SHUTDOWN = 134; // { int sys_shutdown(int s, int how); } ++ SYS_SOCKETPAIR = 135; // { int sys_socketpair(int domain, int type, \ ++ SYS_MKDIR = 136; // { int sys_mkdir(const char *path, mode_t mode); } ++ SYS_RMDIR = 137; // { int sys_rmdir(const char *path); } ++ SYS_ADJTIME = 140; // { int sys_adjtime(const struct timeval *delta, \ ++ SYS_GETLOGIN_R = 141; // { int sys_getlogin_r(char *namebuf, u_int namelen); } ++ SYS_SETSID = 147; // { int sys_setsid(void); } ++ SYS_QUOTACTL = 148; // { int sys_quotactl(const char *path, int cmd, \ ++ SYS_YPCONNECT = 150; // { int sys_ypconnect(int type); } ++ SYS_NFSSVC = 155; // { int sys_nfssvc(int flag, void *argp); } ++ SYS_MIMMUTABLE = 159; // { int sys_mimmutable(void *addr, size_t len); } ++ SYS_WAITID = 160; // { int sys_waitid(int idtype, id_t id, \ ++ SYS_GETFH = 161; // { int sys_getfh(const char *fname, fhandle_t *fhp); } ++ SYS___TMPFD = 164; // { int sys___tmpfd(int flags); } ++ SYS_SYSARCH = 165; // { int sys_sysarch(int op, void *parms); } ++ SYS_LSEEK = 166; // { off_t sys_lseek(int fd, off_t offset, int whence); } ++ SYS_TRUNCATE = 167; // { int sys_truncate(const char *path, off_t length); } ++ SYS_FTRUNCATE = 168; // { int sys_ftruncate(int fd, off_t length); } ++ SYS_PREAD = 169; // { ssize_t sys_pread(int fd, void *buf, \ ++ SYS_PWRITE = 170; // { ssize_t sys_pwrite(int fd, const void *buf, \ ++ SYS_PREADV = 171; // { ssize_t sys_preadv(int fd, \ ++ SYS_PWRITEV = 172; // { ssize_t sys_pwritev(int fd, \ ++ SYS_PAD_PREAD = 173; // { ssize_t sys_pad_pread(int fd, void *buf, \ ++ SYS_PAD_PWRITE = 174; // { ssize_t sys_pad_pwrite(int fd, const void *buf, \ ++ SYS_SETGID = 181; // { int sys_setgid(gid_t gid); } ++ SYS_SETEGID = 182; // { int sys_setegid(gid_t egid); } ++ SYS_SETEUID = 183; // { int sys_seteuid(uid_t euid); } ++ SYS_PATHCONF = 191; // { long sys_pathconf(const char *path, int name); } ++ SYS_FPATHCONF = 192; // { long sys_fpathconf(int fd, int name); } ++ SYS_SWAPCTL = 193; // { int sys_swapctl(int cmd, const void *arg, int misc); } ++ SYS_GETRLIMIT = 194; // { int sys_getrlimit(int which, \ ++ SYS_SETRLIMIT = 195; // { int sys_setrlimit(int which, \ ++ SYS_PAD_MMAP = 197; // { void *sys_pad_mmap(void *addr, size_t len, int prot, \ ++ SYS_PAD_LSEEK = 199; // { off_t sys_pad_lseek(int fd, int pad, off_t offset, \ ++ SYS_PAD_TRUNCATE = 200; // { int sys_pad_truncate(const char *path, int pad, \ ++ SYS_PAD_FTRUNCATE = 201; // { int sys_pad_ftruncate(int fd, int pad, off_t length); } ++ SYS_SYSCTL = 202; // { int sys_sysctl(const int *name, u_int namelen, \ ++ SYS_MLOCK = 203; // { int sys_mlock(const void *addr, size_t len); } ++ SYS_MUNLOCK = 204; // { int sys_munlock(const void *addr, size_t len); } ++ SYS_GETPGID = 207; // { pid_t sys_getpgid(pid_t pid); } ++ SYS_UTRACE = 209; // { int sys_utrace(const char *label, const void *addr, \ ++ SYS_SEMGET = 221; // { int sys_semget(key_t key, int nsems, int semflg); } ++ SYS_MSGGET = 225; // { int sys_msgget(key_t key, int msgflg); } ++ SYS_MSGSND = 226; // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \ ++ SYS_MSGRCV = 227; // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ ++ SYS_SHMAT = 228; // { void *sys_shmat(int shmid, const void *shmaddr, \ ++ SYS_SHMDT = 230; // { int sys_shmdt(const void *shmaddr); } ++ SYS_MINHERIT = 250; // { int sys_minherit(void *addr, size_t len, \ ++ SYS_POLL = 252; // { int sys_poll(struct pollfd *fds, \ ++ SYS_ISSETUGID = 253; // { int sys_issetugid(void); } ++ SYS_LCHOWN = 254; // { int sys_lchown(const char *path, uid_t uid, gid_t gid); } ++ SYS_GETSID = 255; // { pid_t sys_getsid(pid_t pid); } ++ SYS_MSYNC = 256; // { int sys_msync(void *addr, size_t len, int flags); } ++ SYS_PIPE = 263; // { int sys_pipe(int *fdp); } ++ SYS_FHOPEN = 264; // { int sys_fhopen(const fhandle_t *fhp, int flags); } ++ SYS_PAD_PREADV = 267; // { ssize_t sys_pad_preadv(int fd, \ ++ SYS_PAD_PWRITEV = 268; // { ssize_t sys_pad_pwritev(int fd, \ ++ SYS_KQUEUE = 269; // { int sys_kqueue(void); } ++ SYS_MLOCKALL = 271; // { int sys_mlockall(int flags); } ++ SYS_MUNLOCKALL = 272; // { int sys_munlockall(void); } ++ SYS_GETRESUID = 281; // { int sys_getresuid(uid_t *ruid, uid_t *euid, \ ++ SYS_SETRESUID = 282; // { int sys_setresuid(uid_t ruid, uid_t euid, \ ++ SYS_GETRESGID = 283; // { int sys_getresgid(gid_t *rgid, gid_t *egid, \ ++ SYS_SETRESGID = 284; // { int sys_setresgid(gid_t rgid, gid_t egid, \ ++ SYS_PAD_MQUERY = 286; // { void *sys_pad_mquery(void *addr, size_t len, \ ++ SYS_CLOSEFROM = 287; // { int sys_closefrom(int fd); } ++ SYS_SIGALTSTACK = 288; // { int sys_sigaltstack(const struct sigaltstack *nss, \ ++ SYS_SHMGET = 289; // { int sys_shmget(key_t key, size_t size, int shmflg); } ++ SYS_SEMOP = 290; // { int sys_semop(int semid, struct sembuf *sops, \ ++ SYS_FHSTAT = 294; // { int sys_fhstat(const fhandle_t *fhp, \ ++ SYS___SEMCTL = 295; // { int sys___semctl(int semid, int semnum, int cmd, \ ++ SYS_SHMCTL = 296; // { int sys_shmctl(int shmid, int cmd, \ ++ SYS_MSGCTL = 297; // { int sys_msgctl(int msqid, int cmd, \ ++ SYS_SCHED_YIELD = 298; // { int sys_sched_yield(void); } ++ SYS_GETTHRID = 299; // { pid_t sys_getthrid(void); } ++ SYS___THRWAKEUP = 301; // { int sys___thrwakeup(const volatile void *ident, \ ++ SYS___THREXIT = 302; // { void sys___threxit(pid_t *notdead); } ++ SYS___THRSIGDIVERT = 303; // { int sys___thrsigdivert(sigset_t sigmask, \ ++ SYS___GETCWD = 304; // { int sys___getcwd(char *buf, size_t len); } ++ SYS_ADJFREQ = 305; // { int sys_adjfreq(const int64_t *freq, \ ++ SYS_SETRTABLE = 310; // { int sys_setrtable(int rtableid); } ++ SYS_GETRTABLE = 311; // { int sys_getrtable(void); } ++ SYS_FACCESSAT = 313; // { int sys_faccessat(int fd, const char *path, \ ++ SYS_FCHMODAT = 314; // { int sys_fchmodat(int fd, const char *path, \ ++ SYS_FCHOWNAT = 315; // { int sys_fchownat(int fd, const char *path, \ ++ SYS_LINKAT = 317; // { int sys_linkat(int fd1, const char *path1, int fd2, \ ++ SYS_MKDIRAT = 318; // { int sys_mkdirat(int fd, const char *path, \ ++ SYS_MKFIFOAT = 319; // { int sys_mkfifoat(int fd, const char *path, \ ++ SYS_MKNODAT = 320; // { int sys_mknodat(int fd, const char *path, \ ++ SYS_OPENAT = 321; // { int sys_openat(int fd, const char *path, int flags, \ ++ SYS_READLINKAT = 322; // { ssize_t sys_readlinkat(int fd, const char *path, \ ++ SYS_RENAMEAT = 323; // { int sys_renameat(int fromfd, const char *from, \ ++ SYS_SYMLINKAT = 324; // { int sys_symlinkat(const char *path, int fd, \ ++ SYS_UNLINKAT = 325; // { int sys_unlinkat(int fd, const char *path, \ ++ SYS___SET_TCB = 329; // { void sys___set_tcb(void *tcb); } ++ SYS___GET_TCB = 330; // { void *sys___get_tcb(void); } + ) Index: patches/patch-src_syscall_ztypes_openbsd_386_go =================================================================== RCS file: patches/patch-src_syscall_ztypes_openbsd_386_go diff -N patches/patch-src_syscall_ztypes_openbsd_386_go --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_syscall_ztypes_openbsd_386_go 15 Dec 2022 13:10:26 -0000 @@ -0,0 +1,95 @@ +Index: src/syscall/ztypes_openbsd_386.go +--- src/syscall/ztypes_openbsd_386.go.orig ++++ src/syscall/ztypes_openbsd_386.go +@@ -1,5 +1,5 @@ +-// Created by cgo -godefs - DO NOT EDIT +-// cgo -godefs types_openbsd.go ++// Code generated by cmd/cgo -godefs; DO NOT EDIT. ++// cgo -godefs types_openbsd.go | go run mkpost.go + + //go:build 386 && openbsd + +@@ -88,7 +88,7 @@ type Stat_t struct { + Ctim Timespec + Size int64 + Blocks int64 +- Blksize uint32 ++ Blksize int32 + Flags uint32 + Gen uint32 + X__st_birthtim Timespec +@@ -279,8 +279,8 @@ type FdSet struct { + } + + const ( +- SizeofIfMsghdr = 0xec +- SizeofIfData = 0xd4 ++ SizeofIfMsghdr = 0xa0 ++ SizeofIfData = 0x88 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x1a + SizeofRtMsghdr = 0x60 +@@ -309,7 +309,7 @@ type IfData struct { + Link_state uint8 + Mtu uint32 + Metric uint32 +- Pad uint32 ++ Rdomain uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 +@@ -321,10 +321,10 @@ type IfData struct { + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 ++ Oqdrops uint64 + Noproto uint64 + Capabilities uint32 + Lastchange Timeval +- Mclpool [7]Mclpool + } + + type IfaMsghdr struct { +@@ -385,20 +385,14 @@ type RtMetrics struct { + Pad uint32 + } + +-type Mclpool struct { +- Grown int32 +- Alive uint16 +- Hwm uint16 +- Cwm uint16 +- Lwm uint16 +-} ++type Mclpool struct{} + + const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 +- SizeofBpfHdr = 0x14 ++ SizeofBpfHdr = 0x18 + ) + + type BpfVersion struct { +@@ -424,11 +418,14 @@ type BpfInsn struct { + } + + type BpfHdr struct { +- Tstamp BpfTimeval +- Caplen uint32 +- Datalen uint32 +- Hdrlen uint16 +- Pad_cgo_0 [2]byte ++ Tstamp BpfTimeval ++ Caplen uint32 ++ Datalen uint32 ++ Hdrlen uint16 ++ Ifidx uint16 ++ Flowid uint16 ++ Flags uint8 ++ Drops uint8 + } + + type BpfTimeval struct {