diff options
| author | Hiroaki Nakamura <hnakamur@gmail.com> | 2022-03-04 05:13:54 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-03 14:13:54 -0600 |
| commit | 3605dd307ffff74726cc0ce5099599f1a6f9ddb2 (patch) | |
| tree | ea6c21101194923176347c639328edf65cac2e04 /lib/std/os/linux/mips.zig | |
| parent | e91c16e38b58611217f225d002a3321aa24bb47f (diff) | |
| download | zig-3605dd307ffff74726cc0ce5099599f1a6f9ddb2.tar.gz zig-3605dd307ffff74726cc0ce5099599f1a6f9ddb2.zip | |
os/linux/io_uring: add recvmsg and sendmsg (#10212)
* os/linux/io_uring: add recvmsg and sendmsg
* Use std.os.iovec and std.os.iovec_const
* Remove msg_ prefix in msghdr and msghdr_const in arm64 etc
* Strip msg_ prefix in msghdr and msghdr_const for linux arm-eabi
* Copy msghdr and msghdr_const from i386 to mips
* Add sockaddr to lib/std/os/linux/mips.zig
* Copy msghdr and msghdr_const from x86_64 to riscv64
Diffstat (limited to 'lib/std/os/linux/mips.zig')
| -rw-r--r-- | lib/std/os/linux/mips.zig | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/std/os/linux/mips.zig b/lib/std/os/linux/mips.zig index ef586cba19..f9e760babe 100644 --- a/lib/std/os/linux/mips.zig +++ b/lib/std/os/linux/mips.zig @@ -2,11 +2,12 @@ const std = @import("../../std.zig"); const maxInt = std.math.maxInt; const linux = std.os.linux; const socklen_t = linux.socklen_t; -const iovec = linux.iovec; -const iovec_const = linux.iovec_const; +const iovec = std.os.iovec; +const iovec_const = std.os.iovec_const; const uid_t = linux.uid_t; const gid_t = linux.gid_t; const pid_t = linux.pid_t; +const sockaddr = linux.sockaddr; const timespec = linux.timespec; pub fn syscall0(number: SYS) usize { @@ -716,6 +717,26 @@ pub const Flock = extern struct { __unused: [4]u8, }; +pub const msghdr = extern struct { + name: ?*sockaddr, + namelen: socklen_t, + iov: [*]iovec, + iovlen: i32, + control: ?*anyopaque, + controllen: socklen_t, + flags: i32, +}; + +pub const msghdr_const = extern struct { + name: ?*const sockaddr, + namelen: socklen_t, + iov: [*]iovec_const, + iovlen: i32, + control: ?*anyopaque, + controllen: socklen_t, + flags: i32, +}; + pub const blksize_t = i32; pub const nlink_t = u32; pub const time_t = i32; |
