summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/file/files/file-5.45-32-bit-time_t-deux.patch')
-rw-r--r--sys-apps/file/files/file-5.45-32-bit-time_t-deux.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/sys-apps/file/files/file-5.45-32-bit-time_t-deux.patch b/sys-apps/file/files/file-5.45-32-bit-time_t-deux.patch
new file mode 100644
index 000000000000..8c1e0934145c
--- /dev/null
+++ b/sys-apps/file/files/file-5.45-32-bit-time_t-deux.patch
@@ -0,0 +1,29 @@
+https://github.com/file/file/commit/8dc5513908381a14981b16a85d59ba054bf4df52
+
+From 8dc5513908381a14981b16a85d59ba054bf4df52 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Mon, 31 Jul 2023 15:56:12 +0000
+Subject: [PATCH] Check if we support _TIME_BITS. (Werner Fink)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -152,6 +152,18 @@ AC_TYPE_UINT64_T
+ AC_TYPE_INT64_T
+ AC_TYPE_INTPTR_T
+ AC_TYPE_UINTPTR_T
++m4_ifdef([AC_SYS_YEAR2038], [AC_SYS_YEAR2038], [
++# GNU libc only allows setting _TIME_BITS when FILE_OFFSET_BITS is also set.
++# GNU libc defines __TIMESIZE on systems where _TIME_BITS can be set.
++AS_IF([test X"$ac_cv_sys_file_offset_bits" = X"64"], [
++ AC_CHECK_DECL(__TIMESIZE, [
++ AC_DEFINE([_TIME_BITS], [64], [Number of bits in a timestamp, on hosts where this is settable.])
++ ], [], [
++AC_INCLUDES_DEFAULT
++#include <time.h>
++ ])
++ ])
++])
+ AC_FUNC_MMAP
+ AC_FUNC_FORK
+ AC_FUNC_MBRTOWC
+