diff -ur rpm-4.5.orig/rpmio/fts.c rpm-4.5/rpmio/fts.c --- rpm-4.5.orig/rpmio/fts.c 2008-06-10 01:19:25.000000000 +0200 +++ rpm-4.5/rpmio/fts.c 2023-12-06 21:01:08.527372354 +0100 @@ -80,6 +80,16 @@ # define __fchdir fchdir #endif +#ifndef _STAT_VER +#if defined (__aarch64__) +#define _STAT_VER 0 +#elif defined (__x86_64__) +#define _STAT_VER 1 +#else +#define _STAT_VER 3 +#endif +#endif + #if !defined(USHRT_MAX) #define USHRT_MAX 65535 #endif