diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-03-02 17:06:02 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-06-22 12:09:52 -0300 |
commit | 52a5fe70a2c77935afe807fb6e904e512ddd894e (patch) | |
tree | e17476a3ebc60b2e00aea93f24227199caaee8d4 /sysdeps/unix/sysv/linux/ttyname.h | |
parent | a318262bc0081ab83e3f3c90e50462f99148605e (diff) | |
download | glibc-52a5fe70a2c77935afe807fb6e904e512ddd894e.tar glibc-52a5fe70a2c77935afe807fb6e904e512ddd894e.tar.gz glibc-52a5fe70a2c77935afe807fb6e904e512ddd894e.tar.bz2 glibc-52a5fe70a2c77935afe807fb6e904e512ddd894e.zip |
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 <lukma@denx.de>
Diffstat (limited to 'sysdeps/unix/sysv/linux/ttyname.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/ttyname.h | 10 |
1 files changed, 2 insertions, 8 deletions
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 ); } |