mirror of
https://github.com/fairyglade/ly.git
synced 2026-08-06 21:21:58 +00:00
FreeBSD: Fix compilation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
@@ -52,6 +52,7 @@ pub fn build(b: *std.Build) void {
|
||||
addCImport(b, mod, translate_c, target, optimize, "kbio", "#include <sys/kbio.h>");
|
||||
addCImport(b, mod, translate_c, target, optimize, "consio", "#include <sys/consio.h>");
|
||||
addCImport(b, mod, translate_c, target, optimize, "sysctl", "#include <sys/sysctl.h>");
|
||||
addCImport(b, mod, translate_c, target, optimize, "reboot", "#include <sys/reboot.h>");
|
||||
}
|
||||
|
||||
const mod_tests = b.addTest(.{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user