remove sys_types from sys_times includes

This commit is contained in:
auronandace
2026-05-15 11:27:07 +01:00
parent 5e0867eae0
commit f91ca7c0d2
2 changed files with 14 additions and 5 deletions
+11 -2
View File
@@ -1,5 +1,8 @@
sys_includes = ["sys/types.h"]
include_guard = "_SYS_TIMES_H"
sys_includes = []
after_includes = """
#include <bits/clock-t.h> // for clock_t from sys/types.h
"""
include_guard = "_RELIBC_SYS_TIMES_H"
language = "C"
style = "Tag"
no_includes = true
@@ -7,3 +10,9 @@ cpp_compat = true
[enum]
prefix_with_name = true
[export]
include = ["tms"]
[export.rename]
"tms" = "struct tms"
+3 -3
View File
@@ -2,10 +2,10 @@
//!
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_times.h.html>.
use crate::platform;
use platform::{Pal, Sys, types::clock_t};
use crate::platform::types::clock_t;
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_times.h.html>.
#[allow(non_camel_case_types)]
#[repr(C)]
pub struct tms {
tms_utime: clock_t,
@@ -17,5 +17,5 @@ pub struct tms {
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/times.html>.
#[unsafe(no_mangle)]
pub extern "C" fn times(out: *mut tms) -> clock_t {
Sys::times(out)
todo_panic!(0, "TODO: times not implemented");
}