eliminate export function struct workaround for timespec
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user