diff --git a/options/ansi/include/bits/ansi/timespec.h b/options/ansi/include/bits/ansi/timespec.h index 70d06eebe1..926d8e7f3c 100644 --- a/options/ansi/include/bits/ansi/timespec.h +++ b/options/ansi/include/bits/ansi/timespec.h @@ -5,8 +5,13 @@ #include #include +// Equivalent of timespec64 in glibc. +// Should be used only with 64-bit syscalls +// or with appropriate compat syscalls. struct timespec { time_t tv_sec; + // tv_nspec is required to be long by the C standard. + // However linux kernel expects long long. So we add padding. __MLIBC_FIELD_PADDED(long, tv_nsec, long long); };