Skip to content

Commit

Permalink
options/ansi: add a comment about layout of timespec
Browse files Browse the repository at this point in the history
  • Loading branch information
FedorLap2006 committed Mar 4, 2024
1 parent 5d12dfa commit d4d9d0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions options/ansi/include/bits/ansi/timespec.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
#include <bits/ansi/time_t.h>
#include <bits/field-padding.h>

// 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);
};

Expand Down

0 comments on commit d4d9d0a

Please sign in to comment.