Skip to content

Commit

Permalink
Merge #91711: file: backport patch to fix a regression
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Jun 28, 2020
2 parents 3a78c31 + cbb2882 commit d87b595
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkgs/tools/misc/file/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ stdenv.mkDerivation rec {
sha256 = "1lgs2w2sgamzf27kz5h7pajz7v62554q21fbs11n4mfrfrm2hpgh";
};

patches = [
# https://github.com/file/file/commit/85b7ab83257b3191a1a7ca044589a092bcef2bb3
# Without the RCS id change to avoid conflicts. Remove on next bump.
./webassembly-format-fix.patch
];

nativeBuildInputs = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) file;
buildInputs = [ zlib ]
++ stdenv.lib.optional stdenv.hostPlatform.isWindows libgnurx;
Expand Down
13 changes: 13 additions & 0 deletions pkgs/tools/misc/file/webassembly-format-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/funcs.c b/src/funcs.c
index 299b8f022..ecbfa28c5 100644
--- a/src/funcs.c
+++ b/src/funcs.c
@@ -93,7 +93,7 @@ file_checkfmt(char *msg, size_t mlen, const char *fmt)
if (*++p == '%')
continue;
// Skip uninteresting.
- while (strchr("0.'+- ", *p) != NULL)
+ while (strchr("#0.'+- ", *p) != NULL)
p++;
if (*p == '*') {
if (msg)

0 comments on commit d87b595

Please sign in to comment.