Merge branch 'timespec-cleanup' into 'master'

eliminate export function struct workaround for timespec

See merge request redox-os/relibc!1271
This commit is contained in:
Jeremy Soller
2026-05-06 06:14:35 -06:00
2 changed files with 5 additions and 5 deletions
+4 -2
View File
@@ -1,7 +1,6 @@
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/time.h.html
#
# The time header should define timespec but multiple headers make use of it.
# This type is split out from the time header to avoid including all of time in the other headers.
# This type is split out to avoid including all of time.h in the other headers.
#
# POSIX headers that require timespec:
# - aio.h (all functions currently unimplemented but timespec imported)
@@ -24,3 +23,6 @@ cpp_compat = true
[enum]
prefix_with_name = true
[export]
include = ["timespec"]
+1 -3
View File
@@ -4,6 +4,7 @@ use crate::{
};
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/time.h.html>.
#[allow(non_camel_case_types)]
#[repr(C)]
#[derive(Clone, Default, Debug)]
pub struct timespec {
@@ -79,6 +80,3 @@ impl<'a> From<&'a timespec> for syscall::TimeSpec {
}
}
}
#[unsafe(no_mangle)]
pub unsafe extern "C" fn cbindgen_stupid_alias_timespec(_: timespec) {}