diff --git a/lib/std/c.zig b/lib/std/c.zig index 2fb62a3443433cb16f7d998af7a0b434fbd5a761..e9810aeb0912015c015dd68f1259cde477b1a60a 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -9690,6 +9690,7 @@ pub const NSIG = switch (native_os) { .illumos => 75, // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h#L42 .openbsd, .serenity => 33, + .dragonfly => 64, else => {}, }; diff --git a/lib/std/fs/test.zig b/lib/std/fs/test.zig index 608bc73e62408ce4b929e6c47d155c2309ad9dae..94cf3055e562c0cc077b19c0951578f5bdf05c66 100644 --- a/lib/std/fs/test.zig +++ b/lib/std/fs/test.zig @@ -821,7 +821,7 @@ test "file operations on directories" { try expectError(error.IsDir, ctx.dir.createFile(io, test_dir_name, .{})); try expectError(error.IsDir, ctx.dir.deleteFile(io, test_dir_name)); switch (native_os) { - .dragonfly, .netbsd => { + .netbsd => { // no error when reading a directory. See https://github.com/ziglang/zig/issues/5732 const buf = try ctx.dir.readFileAlloc(io, test_dir_name, testing.allocator, .unlimited); testing.allocator.free(buf); @@ -1241,6 +1241,7 @@ test "createDirPath, put some files in it, deleteTreeMinStackSize" { test "createDirPath in a directory that no longer exists" { if (native_os == .windows) return error.SkipZigTest; // Windows returns FileBusy if attempting to remove an open dir + if (native_os == .dragonfly) return error.SkipZigTest; // DragonflyBSD does not produce error (hammer2 fs) const io = testing.io; diff --git a/lib/std/posix/test.zig b/lib/std/posix/test.zig index 64845d15ee7b3b778a427756fb6ccb533243bfd8..6fdb980b1bb93ab2db7d1a404cb996c7cf3c24ac 100644 --- a/lib/std/posix/test.zig +++ b/lib/std/posix/test.zig @@ -364,9 +364,10 @@ test "getrlimit and setrlimit" { } test "sigrtmin/max" { - if (native_os == .wasi or native_os == .windows or native_os.isDarwin() or native_os == .openbsd) { - return error.SkipZigTest; - } + if (native_os.isDarwin() or switch (native_os) { + .wasi, .windows, .openbsd, .dragonfly => true, + else => false, + }) return error.SkipZigTest; try expect(posix.sigrtmin() >= 32); try expect(posix.sigrtmin() >= posix.system.sigrtmin()); @@ -397,7 +398,7 @@ fn reserved_signo(i: usize) bool { if (!builtin.link_libc) return false; const max = if (native_os == .netbsd) 32 else 31; if (i > max) return true; - if (native_os == .openbsd) return false; // no RT signals + if (native_os == .openbsd or native_os == .dragonfly) return false; // no RT signals return i < posix.sigrtmin(); }