From 26377fd31908a6ef9a1e62965930ea27db525b6a Mon Sep 17 00:00:00 2001 From: AnErrupTion Date: Mon, 6 Jul 2026 19:56:24 +0200 Subject: [PATCH] FreeBSD: Fix compilation Signed-off-by: AnErrupTion --- ly-core/build.zig | 1 + ly-core/src/interop.zig | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ly-core/build.zig b/ly-core/build.zig index 75ecb3f..f62fb2e 100644 --- a/ly-core/build.zig +++ b/ly-core/build.zig @@ -52,6 +52,7 @@ pub fn build(b: *std.Build) void { addCImport(b, mod, translate_c, target, optimize, "kbio", "#include "); addCImport(b, mod, translate_c, target, optimize, "consio", "#include "); addCImport(b, mod, translate_c, target, optimize, "sysctl", "#include "); + addCImport(b, mod, translate_c, target, optimize, "reboot", "#include "); } const mod_tests = b.addTest(.{ diff --git a/ly-core/src/interop.zig b/ly-core/src/interop.zig index 873db15..f04b2a4 100644 --- a/ly-core/src/interop.zig +++ b/ly-core/src/interop.zig @@ -260,13 +260,13 @@ fn PlatformStruct() type { } pub fn shutdownSystemImpl() !void { - if (isError(reboot.reboot(reboot.RB_POWEROFF))) { + if (isError(unistd.reboot(reboot.RB_POWEROFF))) { return error.CouldntShutdown; } } pub fn rebootSystemImpl() !void { - if (isError(reboot.reboot(reboot.RB_AUTOBOOT))) { + if (isError(unistd.reboot(reboot.RB_AUTOBOOT))) { return error.CouldntReboot; } }