From 52a5fe70a2c77935afe807fb6e904e512ddd894e Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 2 Mar 2021 17:06:02 -0300 Subject: Use 64 bit time_t stat internally For the legacy ABI with supports 32-bit time_t it calls the 64-bit time directly, since the LFS symbols calls the 64-bit time_t ones internally. Checked on i686-linux-gnu and x86_64-linux-gnu. Reviewed-by: Lukasz Majewski --- sysdeps/unix/sysv/linux/ttyname.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'sysdeps/unix/sysv/linux/ttyname.h') diff --git a/sysdeps/unix/sysv/linux/ttyname.h b/sysdeps/unix/sysv/linux/ttyname.h index 0a0048cc02..5dcbfef973 100644 --- a/sysdeps/unix/sysv/linux/ttyname.h +++ b/sysdeps/unix/sysv/linux/ttyname.h @@ -25,24 +25,18 @@ linux/Documentation/devices.txt (on linux < 4.10) or linux/Documentation/admin-guide/devices.txt (on linux >= 4.10). */ static inline bool -is_pty (struct stat64 *sb) +is_pty (struct __stat64_t64 *sb) { -#ifdef _STATBUF_ST_RDEV int m = __gnu_dev_major (sb->st_rdev); return (136 <= m && m <= 143); -#else - return false; -#endif } static inline bool -is_mytty (const struct stat64 *mytty, const struct stat64 *maybe) +is_mytty (const struct __stat64_t64 *mytty, const struct __stat64_t64 *maybe) { return (maybe->st_ino == mytty->st_ino && maybe->st_dev == mytty->st_dev -#ifdef _STATBUF_ST_RDEV && S_ISCHR (maybe->st_mode) && maybe->st_rdev == mytty->st_rdev -#endif ); } -- cgit 1.4.1