/* total size (bytes): 16 */ }
(gdb) ptype /r __time_t
type = long
(gdb) ptype /r __suseconds_t
type = long
(gdb) ptype /r __syscall_slong_t
type = long
❯ getconf LONG_BIT
64
On armv8l, the target architecture there, we have:
(sid_armhf-dchroot)pvaneynd@amdahl:~$ uname -a
Linux amdahl 6.1.0-23-arm64 #1 SMP Debian 6.1.99-1 (2024-07-15) armv8l GNU/Linux
Hi,
So the definition is a bit complex as there are many indirections. I can give the `gdb` view of the world, which should be the ground truth:
For reference: on x86_64, so
❯ uname -a
Linux frost 6.9.9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.9-1 (2024-07-13) x86_64 GNU/Linux
we have:
(gdb) ptype /r test_timeval
type = struct timeval {
__time_t tv_sec;
__suseconds_t tv_usec;
}
(gdb) ptype /o test_timeval
/* offset | size */ type = struct timeval {
/* 0 | 8 */ __time_t tv_sec;
/* 8 | 8 */ __suseconds_t tv_usec;
(gdb) ptype /r test_timespec
type = struct timespec {
__time_t tv_sec;
__syscall_
}
(gdb) ptype /o test_timespec
/* offset | size */ type = struct timespec {
/* 0 | 8 */ __time_t tv_sec;
/* 8 | 8 */ __syscall_slong_t tv_nsec;
(gdb) ptype /r __time_t
type = long
(gdb) ptype /r __suseconds_t
type = long
(gdb) ptype /r __syscall_slong_t
type = long
❯ getconf LONG_BIT
64
On armv8l, the target architecture there, we have:
(sid_armhf- dchroot) pvaneynd@ amdahl: ~$ uname -a
Linux amdahl 6.1.0-23-arm64 #1 SMP Debian 6.1.99-1 (2024-07-15) armv8l GNU/Linux
We have:
(gdb) ptype /r test_timeval
type = struct timeval {
__time64_t tv_sec;
__suseconds64_t tv_usec;
}
(gdb) ptype /o test_timeval
/* offset | size */ type = struct timeval {
/* 0 | 8 */ __time64_t tv_sec;
/* 8 | 8 */ __suseconds64_t tv_usec;
(gdb) ptype /r test_timespec
type = struct timespec {
__time64_t tv_sec;
long tv_nsec;
}
(gdb) ptype /o test_timespec
/* offset | size */ type = struct timespec {
/* 0 | 8 */ __time64_t tv_sec;
/* 8 | 4 */ long tv_nsec;
/* XXX 4-byte padding */
(gdb) ptype /r __time64_t
type = long long
(gdb) ptype /r __suseconds64_t
type = long long
(sid_armhf- dchroot) pvaneynd@ amdahl: ~$ getconf LONG_BIT
32
Best regards, Peter