aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/posix/getaddrinfo.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-03-02 17:06:02 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-22 12:09:52 -0300
commit52a5fe70a2c77935afe807fb6e904e512ddd894e (patch)
treee17476a3ebc60b2e00aea93f24227199caaee8d4 /sysdeps/posix/getaddrinfo.c
parenta318262bc0081ab83e3f3c90e50462f99148605e (diff)
downloadglibc-52a5fe70a2c77935afe807fb6e904e512ddd894e.tar.xz
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/posix/getaddrinfo.c')
-rw-r--r--sysdeps/posix/getaddrinfo.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index b7e1aee80f..f7f19f1d7c 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1636,16 +1636,16 @@ static int gaiconf_reload_flag_ever_set;
/* Last modification time. */
#ifdef _STATBUF_ST_NSEC
-static struct timespec gaiconf_mtime;
+static struct __timespec64 gaiconf_mtime;
static inline void
-save_gaiconf_mtime (const struct stat64 *st)
+save_gaiconf_mtime (const struct __stat64_t64 *st)
{
gaiconf_mtime = st->st_mtim;
}
static inline bool
-check_gaiconf_mtime (const struct stat64 *st)
+check_gaiconf_mtime (const struct __stat64_t64 *st)
{
return (st->st_mtim.tv_sec == gaiconf_mtime.tv_sec
&& st->st_mtim.tv_nsec == gaiconf_mtime.tv_nsec);
@@ -1656,13 +1656,13 @@ check_gaiconf_mtime (const struct stat64 *st)
static time_t gaiconf_mtime;
static inline void
-save_gaiconf_mtime (const struct stat64 *st)
+save_gaiconf_mtime (const struct __stat64_t64 *st)
{
gaiconf_mtime = st->st_mtime;
}
static inline bool
-check_gaiconf_mtime (const struct stat64 *st)
+check_gaiconf_mtime (const struct __stat64_t64 *st)
{
return st->st_mtime == gaiconf_mtime;
}
@@ -1777,8 +1777,8 @@ gaiconf_init (void)
FILE *fp = fopen (GAICONF_FNAME, "rce");
if (fp != NULL)
{
- struct stat64 st;
- if (__fstat64 (fileno (fp), &st) != 0)
+ struct __stat64_t64 st;
+ if (__fstat64_time64 (fileno (fp), &st) != 0)
{
fclose (fp);
goto no_file;
@@ -2130,8 +2130,8 @@ gaiconf_init (void)
static void
gaiconf_reload (void)
{
- struct stat64 st;
- if (__stat64 (GAICONF_FNAME, &st) != 0
+ struct __stat64_t64 st;
+ if (__stat64_time64 (GAICONF_FNAME, &st) != 0
|| !check_gaiconf_mtime (&st))
gaiconf_init ();
}