Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/compiler/build_runner.zig
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ pub fn main() !void {
else => return err,
};

var w = if (watch) try Watch.init() else undefined;
var w: Watch = if (watch and Watch.have_impl) try Watch.init() else undefined;

try run.thread_pool.init(thread_pool_options);
defer run.thread_pool.deinit();
Expand All @@ -435,6 +435,9 @@ pub fn main() !void {
else => return err,
};
if (fuzz) {
if (builtin.single_threaded) {
fatal("--fuzz not yet implemented for single-threaded builds", .{});
}
switch (builtin.os.tag) {
// Current implementation depends on two things that need to be ported to Windows:
// * Memory-mapping to share data between the fuzzer and build runner.
Expand Down
2 changes: 1 addition & 1 deletion lib/std/Build/Watch.zig
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ const Os = switch (builtin.os.tag) {
};
}
},
.dragonfly, .freebsd, .netbsd, .openbsd, .ios, .macos, .tvos, .visionos, .watchos, .haiku => struct {
.dragonfly, .freebsd, .netbsd, .openbsd, .ios, .macos, .tvos, .visionos, .watchos => struct {
const posix = std.posix;

kq_fd: i32,
Expand Down
7 changes: 5 additions & 2 deletions lib/std/c.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5703,6 +5703,9 @@ pub const SOCK = switch (native_os) {
pub const RAW = 3;
pub const SEQPACKET = 5;
pub const MISC = 255;

pub const NONBLOCK = 0x40000;
pub const CLOEXEC = 0x80000;
},
.openbsd => struct {
pub const STREAM = 1;
Expand Down Expand Up @@ -10824,8 +10827,8 @@ pub const LC = enum(c_int) {

pub extern "c" fn setlocale(category: LC, locale: ?[*:0]const u8) ?[*:0]const u8;

pub const getcontext = if (builtin.target.abi.isAndroid() or builtin.target.os.tag == .openbsd)
{} // android bionic and openbsd libc does not implement getcontext
pub const getcontext = if (builtin.target.abi.isAndroid() or builtin.target.os.tag == .openbsd or builtin.target.os.tag == .haiku)
{} // libc does not implement getcontext
else if (native_os == .linux and builtin.target.abi.isMusl())
linux.getcontext
else
Expand Down
5 changes: 5 additions & 0 deletions lib/std/c/haiku.zig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ pub extern "root" fn get_system_info(system_info: *system_info) usize;
pub extern "root" fn _get_team_info(team: i32, team_info: *team_info, size: usize) i32;
pub extern "root" fn _get_next_area_info(team: i32, cookie: *i64, area_info: *area_info, size: usize) i32;
pub extern "root" fn _get_next_image_info(team: i32, cookie: *i32, image_info: *image_info, size: usize) i32;
pub extern "root" fn _kern_get_current_team() team_id;
pub extern "root" fn _kern_open_dir(fd: fd_t, path: [*:0]const u8) fd_t;
pub extern "root" fn _kern_read_dir(fd: fd_t, buffer: [*]u8, bufferSize: usize, maxCount: u32) isize;
pub extern "root" fn _kern_rewind_dir(fd: fd_t) status_t;
pub extern "root" fn _kern_read_stat(fd: fd_t, path: [*:0]const u8, traverseLink: bool, stat: *std.c.Stat, statSize: usize) status_t;

pub const area_info = extern struct {
area: u32,
Expand Down
1 change: 1 addition & 0 deletions lib/std/crypto/Certificate/Bundle.zig
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub fn rescan(cb: *Bundle, gpa: Allocator) RescanError!void {
.netbsd => return rescanWithPath(cb, gpa, "/etc/openssl/certs/ca-certificates.crt"),
.dragonfly => return rescanWithPath(cb, gpa, "/usr/local/etc/ssl/cert.pem"),
.solaris, .illumos => return rescanWithPath(cb, gpa, "/etc/ssl/cacert.pem"),
.haiku => return rescanWithPath(cb, gpa, "/boot/system/data/ssl/CARootCertificates.pem"),
// https://github.com/SerenityOS/serenity/blob/222acc9d389bc6b490d4c39539761b043a4bfcb0/Ports/ca-certificates/package.sh#L19
.serenity => return rescanWithPath(cb, gpa, "/etc/ssl/certs/ca-certificates.crt"),
.windows => return rescanWindows(cb, gpa),
Expand Down
3 changes: 2 additions & 1 deletion lib/std/fs/Dir.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub const Entry = struct {

const IteratorError = error{
AccessDenied,
PermissionDenied,
SystemResources,
/// WASI-only. The path of an entry could not be encoded as valid UTF-8.
/// WASI is unable to handle paths that cannot be encoded as well-formed UTF-8.
Expand Down Expand Up @@ -287,7 +288,7 @@ pub const Iterator = switch (native_os) {
name,
false,
&stat_info,
0,
@sizeOf(posix.Stat),
)))) {
.SUCCESS => {},
.INVAL => unreachable,
Expand Down
Loading