This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit 3fbc33010c76721d34f676d8efb45bcc54e0d575) --- NEWS | 1 + misc/daemon.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 6c6dc03c6e..cbb3ac5827 100644 --- a/NEWS +++ b/NEWS @@ -32,6 +32,7 @@ The following bugs are resolved with this release: AT_SYMLINK_NOFOLLOW [29109] libc: posix_spawn() always returns 1 (EPERM) on clone() failure + [29203] libc: daemon is not y2038 aware \f Version 2.35 diff --git a/misc/daemon.c b/misc/daemon.c index 0e688f4d74..3c73ac2ab8 100644 --- a/misc/daemon.c +++ b/misc/daemon.c @@ -61,11 +61,10 @@ daemon (int nochdir, int noclose) (void)__chdir("/"); if (!noclose) { - struct stat64 st; + struct __stat64_t64 st; if ((fd = __open_nocancel(_PATH_DEVNULL, O_RDWR, 0)) != -1 - && (__builtin_expect (__fstat64 (fd, &st), 0) - == 0)) { + && __glibc_likely (__fstat64_time64 (fd, &st) == 0)) { if (__builtin_expect (S_ISCHR (st.st_mode), 1) != 0 #if defined DEV_NULL_MAJOR && defined DEV_NULL_MINOR && (st.st_rdev -- 2.34.1
This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit ec995fb2152f160f02bf695ff83c45df4a6cd868) --- NEWS | 1 + misc/getusershell.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index cbb3ac5827..ef700e0e2c 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,7 @@ The following bugs are resolved with this release: [29109] libc: posix_spawn() always returns 1 (EPERM) on clone() failure [29203] libc: daemon is not y2038 aware + [29204] libc: getusershell is not 2038 aware \f Version 2.35 diff --git a/misc/getusershell.c b/misc/getusershell.c index 11f5aa83f8..4221095dca 100644 --- a/misc/getusershell.c +++ b/misc/getusershell.c @@ -97,7 +97,7 @@ initshells (void) { char **sp, *cp; FILE *fp; - struct stat64 statb; + struct __stat64_t64 statb; size_t flen; free(shells); @@ -106,7 +106,7 @@ initshells (void) strings = NULL; if ((fp = fopen(_PATH_SHELLS, "rce")) == NULL) goto init_okshells_noclose; - if (__fstat64(fileno(fp), &statb) == -1) { + if (__fstat64_time64(fileno(fp), &statb) == -1) { init_okshells: (void)fclose(fp); init_okshells_noclose: -- 2.34.1
This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit 574ba60fc8a7fb35e6216e2fdecc521acab7ffd2) --- NEWS | 1 + sysdeps/posix/posix_fallocate.c | 4 ++-- sysdeps/posix/posix_fallocate64.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index ef700e0e2c..6783d18015 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,7 @@ The following bugs are resolved with this release: failure [29203] libc: daemon is not y2038 aware [29204] libc: getusershell is not 2038 aware + [29207] libc: posix_fallocate fallback implementation is not y2038 \f Version 2.35 diff --git a/sysdeps/posix/posix_fallocate.c b/sysdeps/posix/posix_fallocate.c index 037d328647..9720e71cc6 100644 --- a/sysdeps/posix/posix_fallocate.c +++ b/sysdeps/posix/posix_fallocate.c @@ -30,7 +30,7 @@ int posix_fallocate (int fd, __off_t offset, __off_t len) { - struct stat64 st; + struct __stat64_t64 st; if (offset < 0 || len < 0) return EINVAL; @@ -48,7 +48,7 @@ posix_fallocate (int fd, __off_t offset, __off_t len) } /* We have to make sure that this is really a regular file. */ - if (__fstat64 (fd, &st) != 0) + if (__fstat64_time64 (fd, &st) != 0) return EBADF; if (S_ISFIFO (st.st_mode)) return ESPIPE; diff --git a/sysdeps/posix/posix_fallocate64.c b/sysdeps/posix/posix_fallocate64.c index a670ee0a39..bf984f7f91 100644 --- a/sysdeps/posix/posix_fallocate64.c +++ b/sysdeps/posix/posix_fallocate64.c @@ -30,7 +30,7 @@ int __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len) { - struct stat64 st; + struct __stat64_t64 st; if (offset < 0 || len < 0) return EINVAL; @@ -48,7 +48,7 @@ __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len) } /* We have to make sure that this is really a regular file. */ - if (__fstat64 (fd, &st) != 0) + if (__fstat64_time64 (fd, &st) != 0) return EBADF; if (S_ISFIFO (st.st_mode)) return ESPIPE; -- 2.34.1
This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit 6e7137f28c9d743d66b5a1cb8fa0d1717b96f853) --- NEWS | 1 + sysdeps/posix/fpathconf.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 6783d18015..4757dea7ab 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,7 @@ The following bugs are resolved with this release: [29203] libc: daemon is not y2038 aware [29204] libc: getusershell is not 2038 aware [29207] libc: posix_fallocate fallback implementation is not y2038 + [29208] libc: fpathconf(_PC_ASYNC_IO) is not y2038 aware \f Version 2.35 diff --git a/sysdeps/posix/fpathconf.c b/sysdeps/posix/fpathconf.c index 216f2a9c8d..4b215e0600 100644 --- a/sysdeps/posix/fpathconf.c +++ b/sysdeps/posix/fpathconf.c @@ -131,9 +131,9 @@ __fpathconf (int fd, int name) #ifdef _POSIX_ASYNC_IO { /* AIO is only allowed on regular files and block devices. */ - struct stat64 st; + struct __stat64_t64 st; - if (__fstat64 (fd, &st) < 0 + if (__fstat64_time64 (fd, &st) < 0 || (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode))) return -1; else -- 2.34.1
This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit 87f1ec12e79a3895b33801fa816884f0d24ae7ef) --- NEWS | 1 + sysdeps/posix/isfdtype.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 4757dea7ab..c943938656 100644 --- a/NEWS +++ b/NEWS @@ -36,6 +36,7 @@ The following bugs are resolved with this release: [29204] libc: getusershell is not 2038 aware [29207] libc: posix_fallocate fallback implementation is not y2038 [29208] libc: fpathconf(_PC_ASYNC_IO) is not y2038 aware + [29209] libc: isfdtype is not y2038 aware \f Version 2.35 diff --git a/sysdeps/posix/isfdtype.c b/sysdeps/posix/isfdtype.c index 192c7f9be6..d26c14259e 100644 --- a/sysdeps/posix/isfdtype.c +++ b/sysdeps/posix/isfdtype.c @@ -24,12 +24,12 @@ int isfdtype (int fildes, int fdtype) { - struct stat64 st; + struct __stat64_t64 st; int result; { int save_error = errno; - result = __fstat64 (fildes, &st); + result = __fstat64_time64 (fildes, &st); __set_errno (save_error); } -- 2.34.1
This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit 3cd4785ea02cc3878bf21996cf9b61b3a306447e) --- NEWS | 1 + inet/ruserpass.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index c943938656..5692715ef2 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,7 @@ The following bugs are resolved with this release: [29207] libc: posix_fallocate fallback implementation is not y2038 [29208] libc: fpathconf(_PC_ASYNC_IO) is not y2038 aware [29209] libc: isfdtype is not y2038 aware + [29210] network: ruserpass is not y2038 aware \f Version 2.35 diff --git a/inet/ruserpass.c b/inet/ruserpass.c index d61a72877d..75e2a06552 100644 --- a/inet/ruserpass.c +++ b/inet/ruserpass.c @@ -95,7 +95,7 @@ ruserpass (const char *host, const char **aname, const char **apass) char *hdir, *buf, *tmp; char myname[1024], *mydomain; int t, usedefault = 0; - struct stat64 stb; + struct __stat64_t64 stb; hdir = __libc_secure_getenv("HOME"); if (hdir == NULL) { @@ -174,7 +174,7 @@ next: break; case PASSWD: if (strcmp(*aname, "anonymous") && - __fstat64(fileno(cfile), &stb) >= 0 && + __fstat64_time64(fileno(cfile), &stb) >= 0 && (stb.st_mode & 077) != 0) { warnx(_("Error: .netrc file is readable by others.")); warnx(_("Remove 'password' line or make file unreadable by others.")); -- 2.34.1
This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit 634f566c3e20a8a620dbd869a0089e33c105a3ea) --- NEWS | 1 + catgets/open_catalog.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 5692715ef2..beaaf7a6c2 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,7 @@ The following bugs are resolved with this release: [29208] libc: fpathconf(_PC_ASYNC_IO) is not y2038 aware [29209] libc: isfdtype is not y2038 aware [29210] network: ruserpass is not y2038 aware + [29211] libc: __open_catalog is not y2038 aware \f Version 2.35 diff --git a/catgets/open_catalog.c b/catgets/open_catalog.c index 48c2a4b983..cb1d123cdb 100644 --- a/catgets/open_catalog.c +++ b/catgets/open_catalog.c @@ -39,7 +39,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var, __nl_catd catalog) { int fd = -1; - struct stat64 st; + struct __stat64_t64 st; int swapping; size_t cnt; size_t max_offset; @@ -193,7 +193,7 @@ __open_catalog (const char *cat_name, const char *nlspath, const char *env_var, return -1; } - if (__builtin_expect (__fstat64 (fd, &st), 0) < 0) + if (__glibc_unlikely (__fstat64_time64 (fd, &st) < 0)) goto close_unlock_return; if (__builtin_expect (!S_ISREG (st.st_mode), 0) -- 2.34.1
The issue is only when used within libc.so (iconvconfig already builds with _TIME_SIZE=64). This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit c789e6e40974e2b67bd33a17f29b20dce6ae8822) --- NEWS | 1 + iconv/gconv_parseconfdir.h | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index beaaf7a6c2..8cea3b52d3 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ The following bugs are resolved with this release: [29209] libc: isfdtype is not y2038 aware [29210] network: ruserpass is not y2038 aware [29211] libc: __open_catalog is not y2038 aware + [29213] libc: gconv_parseconfdir is not y2038 aware \f Version 2.35 diff --git a/iconv/gconv_parseconfdir.h b/iconv/gconv_parseconfdir.h index c0de548833..debb96b322 100644 --- a/iconv/gconv_parseconfdir.h +++ b/iconv/gconv_parseconfdir.h @@ -32,8 +32,11 @@ # define readdir __readdir # define closedir __closedir # define mempcpy __mempcpy -# define lstat64 __lstat64 +# define struct_stat struct __stat64_t64 +# define lstat __lstat64_time64 # define feof_unlocked __feof_unlocked +#else +# define struct_stat struct stat #endif /* Name of the file containing the module information in the directories @@ -158,12 +161,12 @@ gconv_parseconfdir (const char *prefix, const char *dir, size_t dir_len) && strcmp (ent->d_name + len - strlen (suffix), suffix) == 0) { char *conf; - struct stat64 st; + struct_stat st; if (asprintf (&conf, "%s/%s", buf, ent->d_name) < 0) continue; if (ent->d_type != DT_UNKNOWN - || (lstat64 (conf, &st) != -1 && S_ISREG (st.st_mode))) + || (lstat (conf, &st) != -1 && S_ISREG (st.st_mode))) found |= read_conf_file (conf, dir, dir_len); free (conf); -- 2.34.1