The patch below builds for me on the hppa platform.
Testcases needs verifying on physical hardware though.
Helge
diff -up ./testsuite/path.c.org ./testsuite/path.c
--- ./testsuite/path.c.org 2024-03-13 07:01:04.610222544 +0000
+++ ./testsuite/path.c 2024-03-13 07:11:16.630339502 +0000
@@ -15,9 +15,14 @@
* License along with this library; if not, see <
http://www.gnu.org/licenses/>.
*/
+#if !defined(_TIME_BITS) || _TIME_BITS != 64
+#define NEED_WRAPPER
/* We unset _FILE_OFFSET_BITS here so we can override both stat and stat64 on
* 32-bit architectures and forward each to the right libc function */
#undef _FILE_OFFSET_BITS
+#else
+#undef NEED_WRAPPER
+#endif
#include <assert.h>
#include <dirent.h>
@@ -191,6 +196,7 @@ TS_EXPORT int prefix ## stat ## suffix (
return _fn(ver, p, st); \
}
+#ifdef NEED_WRAPPER
WRAP_1ARG(DIR*, NULL, opendir);
WRAP_1ARG(int, -1, chdir);
@@ -212,3 +218,4 @@ WRAP_VERSTAT(__lx,);
WRAP_VERSTAT(__x,64);
WRAP_VERSTAT(__lx,64);
#endif
+#endif
diff -up ./tools/depmod.c.org ./tools/depmod.c
--- ./tools/depmod.c.org 2024-03-13 06:56:13.616085242 +0000
+++ ./tools/depmod.c 2024-03-13 07:13:11.4176