mirror of https://github.com/fairyglade/ly.git
FreeBSD: Fix compilation
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
5fc5fd62a0
commit
26377fd319
|
|
@ -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, "kbio", "#include <sys/kbio.h>");
|
||||||
addCImport(b, mod, translate_c, target, optimize, "consio", "#include <sys/consio.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, "sysctl", "#include <sys/sysctl.h>");
|
||||||
|
addCImport(b, mod, translate_c, target, optimize, "reboot", "#include <sys/reboot.h>");
|
||||||
}
|
}
|
||||||
|
|
||||||
const mod_tests = b.addTest(.{
|
const mod_tests = b.addTest(.{
|
||||||
|
|
|
||||||
|
|
@ -260,13 +260,13 @@ fn PlatformStruct() type {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn shutdownSystemImpl() !void {
|
pub fn shutdownSystemImpl() !void {
|
||||||
if (isError(reboot.reboot(reboot.RB_POWEROFF))) {
|
if (isError(unistd.reboot(reboot.RB_POWEROFF))) {
|
||||||
return error.CouldntShutdown;
|
return error.CouldntShutdown;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn rebootSystemImpl() !void {
|
pub fn rebootSystemImpl() !void {
|
||||||
if (isError(reboot.reboot(reboot.RB_AUTOBOOT))) {
|
if (isError(unistd.reboot(reboot.RB_AUTOBOOT))) {
|
||||||
return error.CouldntReboot;
|
return error.CouldntReboot;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue