https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114065
--- Comment #72 from Nicolas Boulenguez <nicolas at debian dot org> ---
What are the arguments against an Ada representation clause generated from the
actual C layout?
POSIX allows additionnal fields like the Y2038 padding, so GNAT must be
informed of the C configuration in a way or another. Build-time automation
seems safer than human reasoning when there are so many possibilities.
For the record, here is the declaration in
glibc-2.44/time/bits/types/struct_timespec.h.
struct timespec
{
#ifdef __USE_TIME64_REDIRECTS
__time64_t tv_sec; /* Seconds. */
#else
__time_t tv_sec; /* Seconds. */
#endif
#if __WORDSIZE == 64 \
|| (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
|| (__TIMESIZE == 32 && !defined __USE_TIME64_REDIRECTS)
__syscall_slong_t tv_nsec; /* Nanoseconds. */
#else
# if __BYTE_ORDER == __BIG_ENDIAN
int: 32; /* Padding. */
long int tv_nsec; /* Nanoseconds. */
# else
long int tv_nsec; /* Nanoseconds. */
int: 32; /* Padding. */
# endif
#endif
};