| ... | ... | @@ -6741,6 +6741,62 @@ pub const SOMAXCONN = switch (native_os) { |
| 6741 | 6741 | .freebsd, .dragonfly, .netbsd, .openbsd, .driverkit, .macos, .ios, .tvos, .watchos, .visionos => 128, |
| 6742 | 6742 | else => void, |
| 6743 | 6743 | }; |
| 6744 | pub const SCM = switch (native_os) { |
| 6745 | .linux, .emscripten => linux.SCM, |
| 6746 | // https://github.com/kofemann/opensolaris/blob/80192cd83bf665e708269dae856f9145f7190f74/usr/src/uts/common/sys/socket.h#L172 |
| 6747 | // https://github.com/illumos/illumos-gate/blob/489f6310fe8952e87fc1dce8af87990fcfd90f18/usr/src/uts/common/sys/socket.h#L196 |
| 6748 | .solaris, .illumos => struct { |
| 6749 | pub const RIGHTS = 0x1010; |
| 6750 | pub const UCRED = 0x1012; |
| 6751 | pub const TIMESTAMP = SO.TIMESTAMP; |
| 6752 | }, |
| 6753 | // https://github.com/haiku/haiku/blob/e3d01e53a25446d5ba4999d0ff6dff29a2418657/headers/posix/sys/socket.h#L156 |
| 6754 | .haiku => struct { |
| 6755 | pub const RIGHTS = 1; |
| 6756 | }, |
| 6757 | // https://github.com/SerenityOS/serenity/blob/c6618f36bf0949bd76177f202659b1f3079e0792/Kernel/API/POSIX/sys/socket.h#L171 |
| 6758 | .serenity => struct { |
| 6759 | pub const TIMESTAMP = 0; |
| 6760 | pub const RIGHTS = 1; |
| 6761 | }, |
| 6762 | // https://github.com/freebsd/freebsd-src/blob/614e9b33bf5594d9d09b5d296afa4f3aa6971823/sys/sys/socket.h#L593 |
| 6763 | .freebsd => struct { |
| 6764 | pub const RIGHTS = 1; |
| 6765 | pub const TIMESTAMP = 2; |
| 6766 | pub const CREDS = 3; |
| 6767 | pub const BINTIME = 4; |
| 6768 | pub const REALTIME = 5; |
| 6769 | pub const MONOTONIC = 6; |
| 6770 | pub const TIME_INFO = 7; |
| 6771 | pub const CREDS2 = 8; |
| 6772 | }, |
| 6773 | // https://github.com/DragonFlyBSD/DragonFlyBSD/blob/6098912863ed4c7b3f70d7483910ce2956cf4ed3/sys/sys/socket.h#L520 |
| 6774 | .dragonfly => struct { |
| 6775 | pub const RIGHTS = 1; |
| 6776 | pub const TIMESTAMP = 2; |
| 6777 | pub const CREDS = 3; |
| 6778 | }, |
| 6779 | // https://github.com/NetBSD/src/blob/3311177ea898ab8322292ba0e48faa9b2e834cb6/sys/sys/socket.h#L578 |
| 6780 | .netbsd => struct { |
| 6781 | pub const RIGHTS = 0x01; |
| 6782 | pub const TIMESTAMP = 0x08; |
| 6783 | pub const CREDS = 0x10; |
| 6784 | }, |
| 6785 | // https://github.com/openbsd/src/blob/1b1dd04c9634112eb763374379af99a68ace4328/sys/sys/socket.h#L566 |
| 6786 | .openbsd => struct { |
| 6787 | pub const RIGHTS = 0x01; |
| 6788 | pub const TIMESTAMP = 0x04; |
| 6789 | }, |
| 6790 | // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L1114 |
| 6791 | .driverkit, .macos, .ios, .tvos, .watchos, .visionos => struct { |
| 6792 | pub const RIGHTS = 1; |
| 6793 | pub const TIMESTAMP = 2; |
| 6794 | pub const CREDS = 3; |
| 6795 | pub const TIMESTAMP_MONOTONIC = 4; |
| 6796 | }, |
| 6797 | else => void, |
| 6798 | }; |
| 6799 | |
| 6744 | 6800 | pub const IFNAMESIZE = switch (native_os) { |
| 6745 | 6801 | .linux => linux.IFNAMESIZE, |
| 6746 | 6802 | .emscripten => emscripten.IFNAMESIZE, |
| ... | ... | @@ -11052,7 +11108,6 @@ pub const GETUSTACK = solaris.GETUSTACK; |
| 11052 | 11108 | pub const PORT_ALERT = solaris.PORT_ALERT; |
| 11053 | 11109 | pub const PORT_SOURCE = solaris.PORT_SOURCE; |
| 11054 | 11110 | pub const POSIX_FADV = solaris.POSIX_FADV; |
| 11055 | | pub const SCM = solaris.SCM; |
| 11056 | 11111 | pub const SETCONTEXT = solaris.SETCONTEXT; |
| 11057 | 11112 | pub const SETUSTACK = solaris.GETUSTACK; |
| 11058 | 11113 | pub const SFD = solaris.SFD; |