From 859fc856d38860bbd8738d3a09527d8fcb7dcc7b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 3 Mar 2020 02:57:11 -0500 Subject: [PATCH] fix macosx and freebsd build failures --- lib/std/c/darwin.zig | 4 ++-- lib/std/c/freebsd.zig | 4 ++-- lib/std/os/bits/darwin.zig | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/std/c/darwin.zig b/lib/std/c/darwin.zig index d5ecf6bd81..881e52c72c 100644 --- a/lib/std/c/darwin.zig +++ b/lib/std/c/darwin.zig @@ -56,9 +56,9 @@ pub extern "c" fn host_get_clock_service(host: host_t, clock_id: clock_id_t, clo pub extern "c" fn mach_port_deallocate(task: ipc_space_t, name: mach_port_name_t) kern_return_t; pub const sf_hdtr = extern struct { - headers: [*]iovec_const, + headers: [*]const iovec_const, hdr_cnt: c_int, - trailers: [*]iovec_const, + trailers: [*]const iovec_const, trl_cnt: c_int, }; diff --git a/lib/std/c/freebsd.zig b/lib/std/c/freebsd.zig index dacfa4384d..2c4820bbe9 100644 --- a/lib/std/c/freebsd.zig +++ b/lib/std/c/freebsd.zig @@ -9,9 +9,9 @@ pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int; pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize; pub const sf_hdtr = extern struct { - headers: [*]iovec_const, + headers: [*]const iovec_const, hdr_cnt: c_int, - trailers: [*]iovec_const, + trailers: [*]const iovec_const, trl_cnt: c_int, }; pub extern "c" fn sendfile( diff --git a/lib/std/os/bits/darwin.zig b/lib/std/os/bits/darwin.zig index 22897974c2..fb933c6698 100644 --- a/lib/std/os/bits/darwin.zig +++ b/lib/std/os/bits/darwin.zig @@ -926,6 +926,9 @@ pub const ESOCKTNOSUPPORT = 44; /// Operation not supported pub const ENOTSUP = 45; +/// Operation not supported. Alias of `ENOTSUP`. +pub const EOPNOTSUPP = ENOTSUP; + /// Protocol family not supported pub const EPFNOSUPPORT = 46;