Fix ftbfs on alpha, see #962676
authorHelmut Grohne <helmut@subdivi.de>
Sat, 2 Apr 2022 19:44:53 +0000 (20:44 +0100)
committerPeter Pentchev <roam@debian.org>
Sat, 2 Apr 2022 19:44:53 +0000 (20:44 +0100)
Gbp-Pq: Name 0017-alpha-fbfs-st_mtime.patch

programs/util.c

index 75c882989a9405d16516da3958c6e6159b785a61..89c0d0515d0d7189397e9afa949781c549dafce0 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} };