From 1d1f4fc401b449e325f6c2c04001db14801cd398 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Thu, 15 Aug 2024 19:23:42 +0200 Subject: [PATCH] syscall: add all MacOS errno values ELOOP is used starting with Go 1.23. But I figured I could just add the whole set. --- src/syscall/syscall_libc_darwin.go | 126 +++++++++++++++++++++++++---- 1 file changed, 109 insertions(+), 17 deletions(-) diff --git a/src/syscall/syscall_libc_darwin.go b/src/syscall/syscall_libc_darwin.go index d64f1061..f0d297a7 100644 --- a/src/syscall/syscall_libc_darwin.go +++ b/src/syscall/syscall_libc_darwin.go @@ -57,24 +57,116 @@ const ( O_NONBLOCK = 0x4 ) -// Source: https://opensource.apple.com/source/xnu/xnu-7195.81.3/bsd/sys/errno.h.auto.html +// Source: https://opensource.apple.com/source/xnu/xnu-7195.141.2/bsd/sys/errno.h.auto.html const ( - EPERM Errno = 1 - ENOENT Errno = 2 - EACCES Errno = 13 - EEXIST Errno = 17 - EINTR Errno = 4 - ENOTDIR Errno = 20 - EISDIR Errno = 21 - EINVAL Errno = 22 - EMFILE Errno = 24 - EROFS Errno = 30 - EPIPE Errno = 32 - EAGAIN Errno = 35 - ENOTCONN Errno = 57 - ETIMEDOUT Errno = 60 - ENOSYS Errno = 78 - EWOULDBLOCK Errno = EAGAIN + EPERM Errno = 1 + ENOENT Errno = 2 + ESRCH Errno = 3 + EINTR Errno = 4 + EIO Errno = 5 + ENXIO Errno = 6 + E2BIG Errno = 7 + ENOEXEC Errno = 8 + EBADF Errno = 9 + ECHILD Errno = 10 + EDEADLK Errno = 11 + ENOMEM Errno = 12 + EACCES Errno = 13 + EFAULT Errno = 14 + ENOTBLK Errno = 15 + EBUSY Errno = 16 + EEXIST Errno = 17 + EXDEV Errno = 18 + ENODEV Errno = 19 + ENOTDIR Errno = 20 + EISDIR Errno = 21 + EINVAL Errno = 22 + ENFILE Errno = 23 + EMFILE Errno = 24 + ENOTTY Errno = 25 + ETXTBSY Errno = 26 + EFBIG Errno = 27 + ENOSPC Errno = 28 + ESPIPE Errno = 29 + EROFS Errno = 30 + EMLINK Errno = 31 + EPIPE Errno = 32 + EDOM Errno = 33 + ERANGE Errno = 34 + EAGAIN Errno = 35 + EWOULDBLOCK Errno = EAGAIN + EINPROGRESS Errno = 36 + EALREADY Errno = 37 + ENOTSOCK Errno = 38 + EDESTADDRREQ Errno = 39 + EMSGSIZE Errno = 40 + EPROTOTYPE Errno = 41 + ENOPROTOOPT Errno = 42 + EPROTONOSUPPORT Errno = 43 + ESOCKTNOSUPPORT Errno = 44 + ENOTSUP Errno = 45 + EPFNOSUPPORT Errno = 46 + EAFNOSUPPORT Errno = 47 + EADDRINUSE Errno = 48 + EADDRNOTAVAIL Errno = 49 + ENETDOWN Errno = 50 + ENETUNREACH Errno = 51 + ENETRESET Errno = 52 + ECONNABORTED Errno = 53 + ECONNRESET Errno = 54 + ENOBUFS Errno = 55 + EISCONN Errno = 56 + ENOTCONN Errno = 57 + ESHUTDOWN Errno = 58 + ETOOMANYREFS Errno = 59 + ETIMEDOUT Errno = 60 + ECONNREFUSED Errno = 61 + ELOOP Errno = 62 + ENAMETOOLONG Errno = 63 + EHOSTDOWN Errno = 64 + EHOSTUNREACH Errno = 65 + ENOTEMPTY Errno = 66 + EPROCLIM Errno = 67 + EUSERS Errno = 68 + EDQUOT Errno = 69 + ESTALE Errno = 70 + EREMOTE Errno = 71 + EBADRPC Errno = 72 + ERPCMISMATCH Errno = 73 + EPROGUNAVAIL Errno = 74 + EPROGMISMATCH Errno = 75 + EPROCUNAVAIL Errno = 76 + ENOLCK Errno = 77 + ENOSYS Errno = 78 + EFTYPE Errno = 79 + EAUTH Errno = 80 + ENEEDAUTH Errno = 81 + EPWROFF Errno = 82 + EDEVERR Errno = 83 + EOVERFLOW Errno = 84 + EBADEXEC Errno = 85 + EBADARCH Errno = 86 + ESHLIBVERS Errno = 87 + EBADMACHO Errno = 88 + ECANCELED Errno = 89 + EIDRM Errno = 90 + ENOMSG Errno = 91 + EILSEQ Errno = 92 + ENOATTR Errno = 93 + EBADMSG Errno = 94 + EMULTIHOP Errno = 95 + ENODATA Errno = 96 + ENOLINK Errno = 97 + ENOSR Errno = 98 + ENOSTR Errno = 99 + EPROTO Errno = 100 + ETIME Errno = 101 + EOPNOTSUPP Errno = 102 + ENOPOLICY Errno = 103 + ENOTRECOVERABLE Errno = 104 + EOWNERDEAD Errno = 105 + EQFULL Errno = 106 + ELAST Errno = 106 ) type Signal int