Fix ftbfs on alpha, see #962676
authorHelmut Grohne <helmut@subdivi.de>
Sun, 20 Mar 2022 16:25:50 +0000 (16:25 +0000)
committerPeter Pentchev <roam@debian.org>
Sun, 20 Mar 2022 16:25:50 +0000 (16:25 +0000)
Gbp-Pq: Name 0017-alpha-fbfs-st_mtime.patch

programs/util.c

index 3fd4cd17e662f4f05736442e65c8cfd18b9239d8..a1bd3236a192a5c2a082428d32d56d5d2726d473 100644 (file)
@@ -180,8 +180,10 @@ int UTIL_setFileStat(const char *filename, const stat_t *statbuf)
     /* We check that st_mtime is a macro here in order to give us confidence
      * that struct stat has a struct timespec st_mtim member. We need this
      * check because there are some platforms that claim to be POSIX 2008
-     * compliant but which do not have st_mtim... */
-#if (PLATFORM_POSIX_VERSION >= 200809L) && defined(st_mtime)
+     * compliant but which do not have st_mtim...
+     * And then there is alpha, which doesn't define st_mtime, but still has it.
+     */
+#if (PLATFORM_POSIX_VERSION >= 200809L) && (defined(st_mtime) || defined(__alpha__))
     {
         /* (atime, mtime) */
         struct timespec timebuf[2] = { {0, UTIME_NOW} };