file: 5.45 -> 5.46 (#360058)

authored by

Doron Behar and committed by
GitHub
d91621c5 eba4fcfd

+2 -46
-38
pkgs/tools/misc/file/32-bit-time_t.patch
··· 1 - https://github.com/file/file/commit/218fdf813fd5ccecbb8887a1b62509cd1c6dd3a1.patch 2 - 3 - From 218fdf813fd5ccecbb8887a1b62509cd1c6dd3a1 Mon Sep 17 00:00:00 2001 4 - From: Christos Zoulas <christos@zoulas.com> 5 - Date: Fri, 28 Jul 2023 14:38:25 +0000 6 - Subject: [PATCH] deal with 32 bit time_t 7 - 8 - --- 9 - src/file.h | 8 +++++--- 10 - 1 file changed, 5 insertions(+), 3 deletions(-) 11 - 12 - diff --git a/src/file.h b/src/file.h 13 - index 2e0494d2f..78f574ea1 100644 14 - --- a/src/file.h 15 - +++ b/src/file.h 16 - @@ -27,7 +27,7 @@ 17 - */ 18 - /* 19 - * file.h - definitions for file(1) program 20 - - * @(#)$File: file.h,v 1.247 2023/07/27 19:40:22 christos Exp $ 21 - + * @(#)$File: file.h,v 1.248 2023/07/28 14:38:25 christos Exp $ 22 - */ 23 - 24 - #ifndef __file_h__ 25 - @@ -159,9 +159,11 @@ 26 - /* 27 - * Dec 31, 23:59:59 9999 28 - * we need to make sure that we don't exceed 9999 because some libc 29 - - * implementations like muslc crash otherwise 30 - + * implementations like muslc crash otherwise. If you are unlucky 31 - + * to be running on a system with a 32 bit time_t, then it is even less. 32 - */ 33 - -#define MAX_CTIME CAST(time_t, 0x3afff487cfULL) 34 - +#define MAX_CTIME \ 35 - + CAST(time_t, sizeof(time_t) > 4 ? 0x3afff487cfULL : 0x7fffffffULL) 36 - 37 - #define FILE_BADSIZE CAST(size_t, ~0ul) 38 - #define MAXDESC 64 /* max len of text description/MIME type */
+2 -8
pkgs/tools/misc/file/default.nix
··· 10 10 11 11 stdenv.mkDerivation (finalAttrs: { 12 12 pname = "file"; 13 - version = "5.45"; 13 + version = "5.46"; 14 14 15 15 src = fetchurl { 16 16 urls = [ 17 17 "https://astron.com/pub/file/file-${finalAttrs.version}.tar.gz" 18 18 "https://distfiles.macports.org/file/file-${finalAttrs.version}.tar.gz" 19 19 ]; 20 - hash = "sha256-/Jf1ECm7DiyfTjv/79r2ePDgOe6HK53lwAKm0Jx4TYI="; 20 + hash = "sha256-ycx3x8VgxUMTXtxVWvYJ1WGdvvARmX6YjOQKPXXYYIg="; 21 21 }; 22 22 23 23 outputs = [ "out" "dev" "man" ]; 24 - 25 - patches = [ 26 - # Upstream patch to fix 32-bit tests. 27 - # Will be included in 5.46+ releases. 28 - ./32-bit-time_t.patch 29 - ]; 30 24 31 25 strictDeps = true; 32 26 enableParallelBuilding = true;