From 33d70efb2c9772cc86902761a5755d0f7731dd43 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 2 Apr 2022 20:44:53 +0100 Subject: [PATCH] Fix ftbfs on alpha, see #962676 Gbp-Pq: Name 0017-alpha-fbfs-st_mtime.patch --- programs/util.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/programs/util.c b/programs/util.c index 75c8829..89c0d05 100644 --- a/programs/util.c +++ b/programs/util.c @@ -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} }; -- 2.30.2