Fix ftbfs on alpha, see #962676
authorHelmut Grohne <helmut@subdivi.de>
Mon, 29 Jun 2020 14:10:31 +0000 (15:10 +0100)
committerAlexandre Mestiashvili <mestia@debian.org>
Mon, 29 Jun 2020 14:10:31 +0000 (15:10 +0100)
Gbp-Pq: Name 0017-alpha-fbfs-st_mtime.patch

programs/util.c

index ab1abd3b1862c87d480d320d03aa95c2e9b06e82..1549356c6db4904ebcfa64e99b322cb507c0de6a 100644 (file)
@@ -148,8 +148,10 @@ int UTIL_setFileStat(const char *filename, 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} };