public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: [PATCH 8/9] support: Use 64 bit time_t routines on support_can_chroot
Date: Mon, 13 Feb 2023 14:13:01 -0300	[thread overview]
Message-ID: <20230213171302.3045672-9-adhemerval.zanella@linaro.org> (raw)
In-Reply-To: <20230213171302.3045672-1-adhemerval.zanella@linaro.org>

The failure only shows if the system time is set past 2038.

Checked on i686-linux-gnu and on system emulated arm-linux-gnueabihf
with time set past y2038.
---
 support/support_can_chroot.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/support/support_can_chroot.c b/support/support_can_chroot.c
index 7d9f91205d..626022041a 100644
--- a/support/support_can_chroot.c
+++ b/support/support_can_chroot.c
@@ -16,6 +16,9 @@
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
+#define _FILE_OFFSET_BITS 64
+#define _TIME_BITS 64
+
 #include <errno.h>
 #include <stdio.h>
 #include <support/check.h>
@@ -29,14 +32,14 @@ static void
 callback (void *closure)
 {
   int *result = closure;
-  struct stat64 before;
+  struct stat before;
   xstat ("/dev", &before);
   if (chroot ("/dev") != 0)
     {
       *result = errno;
       return;
     }
-  struct stat64 after;
+  struct stat after;
   xstat ("/", &after);
   TEST_VERIFY (before.st_dev == after.st_dev);
   TEST_VERIFY (before.st_ino == after.st_ino);
-- 
2.34.1


  parent reply	other threads:[~2023-02-13 17:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 17:12 [PATCH 0/9] Use 64 bit time_t routines on support Adhemerval Zanella
2023-02-13 17:12 ` [PATCH 1/9] support: Use 64 bit time_t routines on support_descriptors_list (BZ #30111) Adhemerval Zanella
2023-02-13 17:12 ` [PATCH 2/9] support: Use 64 bit time_t routines on support_stat_nanoseconds Adhemerval Zanella
2023-02-13 17:12 ` [PATCH 3/9] support: Use 64 bit time_t routines on test-container Adhemerval Zanella
2023-02-13 17:12 ` [PATCH 4/9] support: Use 64 bit time_t routines on shell-container Adhemerval Zanella
2023-02-13 17:12 ` [PATCH 5/9] support: Use 64 bit time_t routines on delayed_exit Adhemerval Zanella
2023-02-13 17:12 ` [PATCH 6/9] support: Use 64 bit time_t routines on support_process_state_wait Adhemerval Zanella
2023-02-13 17:13 ` [PATCH 7/9] support: Use 64 bit time_t routines on support_process_kill Adhemerval Zanella
2023-02-13 17:13 ` Adhemerval Zanella [this message]
2023-02-13 17:13 ` [PATCH 9/9] support: Use 64 bit time_t routines on xmkdirp Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230213171302.3045672-9-adhemerval.zanella@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).