From 2e554617e5a6a41bf3f6c6306c753cd53abf728c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 30 Jul 2019 23:48:25 -0400 Subject: ioctl: add fallback for new time64 SIOCGSTAMP[NS] without this, the SIOCGSTAMP and SIOCGSTAMPNS ioctl commands, for obtaining timestamps, would stop working on pre-5.1 kernels after time_t is switched to 64-bit and their values are changed to the new time64 versions. new code is written such that it's statically unreachable on 64-bit archs, and on existing 32-bit archs until the macro values are changed to activate 64-bit time_t. --- src/internal/syscall.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/internal') diff --git a/src/internal/syscall.h b/src/internal/syscall.h index 16edf30a..9f2784db 100644 --- a/src/internal/syscall.h +++ b/src/internal/syscall.h @@ -306,6 +306,13 @@ hidden long __syscall_ret(unsigned long), #define SO_SNDTIMEO_OLD 21 #endif +#ifndef SIOCGSTAMP_OLD +#define SIOCGSTAMP_OLD 0x8906 +#endif +#ifndef SIOCGSTAMPNS_OLD +#define SIOCGSTAMPNS_OLD 0x8907 +#endif + #ifdef SYS_open #define __sys_open2(x,pn,fl) __syscall2(SYS_open, pn, (fl)|O_LARGEFILE) #define __sys_open3(x,pn,fl,mo) __syscall3(SYS_open, pn, (fl)|O_LARGEFILE, mo) -- cgit v1.2.3-70-g09d2