about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* linux: Use socket-constants-time64.h on tst-socket-timestamp-compatAdhemerval Zanella2022-02-141-12/+13
| | | | | | | | The kernel header might not define the SO_TIMESTAMP{NS}_OLD or SO_TIMESTAMP{NS}_NEW if it older than v5.1. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* tst-socket-timestamp-compat.c: Check __TIMESIZE [BZ #28837]H.J. Lu2022-01-291-1/+1
| | | | | time_t size is defined by __TIMESIZE, not __WORDSIZE. Check __TIMESIZE, instead of __WORDSIZE, for time_t size. This fixes BZ #28837.
* Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsgAdhemerval Zanella2022-01-281-0/+265
The timestamps created by __convert_scm_timestamps only make sense for 64 bit time_t programs, 32 bit time_t programs will ignore 64 bit time_t timestamps since SO_TIMESTAMP will be defined to old values (either by glibc or kernel headers). Worse, if the buffer is not suffice MSG_CTRUNC is set to indicate it (which breaks some programs [1]). This patch makes only 64 bit time_t recvmsg and recvmmsg to call __convert_scm_timestamps. Also, the assumption to called it is changed from __ASSUME_TIME64_SYSCALLS to __TIMESIZE != 64 since the setsockopt might be called by libraries built without __TIME_BITS=64. The MSG_CTRUNC is only set for the 64 bit symbols, it should happen only if 64 bit time_t programs run older kernels. Checked on x86_64-linux-gnu and i686-linux-gnu. [1] https://github.com/systemd/systemd/pull/20567 Reviewed-by: Florian Weimer <fweimer@redhat.com>