Skip to content

Commit d4d9d0a

Browse files
committed
options/ansi: add a comment about layout of timespec
1 parent 5d12dfa commit d4d9d0a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

options/ansi/include/bits/ansi/timespec.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
#include <bits/ansi/time_t.h>
66
#include <bits/field-padding.h>
77

8+
// Equivalent of timespec64 in glibc.
9+
// Should be used only with 64-bit syscalls
10+
// or with appropriate compat syscalls.
811
struct timespec {
912
time_t tv_sec;
13+
// tv_nspec is required to be long by the C standard.
14+
// However linux kernel expects long long. So we add padding.
1015
__MLIBC_FIELD_PADDED(long, tv_nsec, long long);
1116
};
1217

0 commit comments

Comments
 (0)