Revert "std.os: sysctl* wrappers, better warning at compile time"
This reverts commit c66151a226.
This commit is contained in:
@@ -4696,8 +4696,11 @@ pub fn sysctl(
|
||||
newp: ?*anyopaque,
|
||||
newlen: usize,
|
||||
) SysCtlError!void {
|
||||
if (builtin.os.tag == .wasi or builtin.os.tag == .haiku) {
|
||||
@compileError("unsupported OS");
|
||||
if (builtin.os.tag == .wasi) {
|
||||
@panic("unsupported"); // TODO should be compile error, not panic
|
||||
}
|
||||
if (builtin.os.tag == .haiku) {
|
||||
@panic("unsupported"); // TODO should be compile error, not panic
|
||||
}
|
||||
|
||||
const name_len = math.cast(c_uint, name.len) orelse return error.NameTooLong;
|
||||
@@ -4718,8 +4721,11 @@ pub fn sysctlbynameZ(
|
||||
newp: ?*anyopaque,
|
||||
newlen: usize,
|
||||
) SysCtlError!void {
|
||||
if (builtin.os.tag == .wasi or builtin.os.tag == .haiku) {
|
||||
@compileError("unsupported OS");
|
||||
if (builtin.os.tag == .wasi) {
|
||||
@panic("unsupported"); // TODO should be compile error, not panic
|
||||
}
|
||||
if (builtin.os.tag == .haiku) {
|
||||
@panic("unsupported"); // TODO should be compile error, not panic
|
||||
}
|
||||
|
||||
switch (errno(system.sysctlbyname(name, oldp, oldlenp, newp, newlen))) {
|
||||
|
||||
Reference in New Issue
Block a user