summary refs log tree commit diff
path: root/pkgs/tools/filesystems/mtools
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2018-11-19 10:19:19 +0000
committerJörg Thalheim <joerg@thalheim.io>2018-11-19 10:19:19 +0000
commit47a239a240a1362d5f637684c9181306e7fd8869 (patch)
treeaefd58401d64a3ae5daceceda551878f1ae2e9f6 /pkgs/tools/filesystems/mtools
parent4f99f26f9b6064c7394e2d4bb94964d6e19d6855 (diff)
downloadnixpkgs-47a239a240a1362d5f637684c9181306e7fd8869.tar
nixpkgs-47a239a240a1362d5f637684c9181306e7fd8869.tar.gz
nixpkgs-47a239a240a1362d5f637684c9181306e7fd8869.tar.bz2
nixpkgs-47a239a240a1362d5f637684c9181306e7fd8869.tar.lz
nixpkgs-47a239a240a1362d5f637684c9181306e7fd8869.tar.xz
nixpkgs-47a239a240a1362d5f637684c9181306e7fd8869.tar.zst
nixpkgs-47a239a240a1362d5f637684c9181306e7fd8869.zip
mtools: fix darwin build
Diffstat (limited to 'pkgs/tools/filesystems/mtools')
-rw-r--r--pkgs/tools/filesystems/mtools/default.nix3
-rw-r--r--pkgs/tools/filesystems/mtools/fix-dos_to_wchar-declaration.patch11
2 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/tools/filesystems/mtools/default.nix b/pkgs/tools/filesystems/mtools/default.nix
index 94769723969..1cbe48ecee5 100644
--- a/pkgs/tools/filesystems/mtools/default.nix
+++ b/pkgs/tools/filesystems/mtools/default.nix
@@ -10,7 +10,8 @@ stdenv.mkDerivation rec {
 
   # Prevents errors such as "mainloop.c:89:15: error: expected ')'"
   # Upstream issue https://lists.gnu.org/archive/html/info-mtools/2014-02/msg00000.html
-  patches = stdenv.lib.optional stdenv.isDarwin ./UNUSED-darwin.patch;
+  patches = [ ./fix-dos_to_wchar-declaration.patch ] ++
+    stdenv.lib.optional stdenv.isDarwin ./UNUSED-darwin.patch;
 
   # fails to find X on darwin
   configureFlags = stdenv.lib.optional stdenv.isDarwin "--without-x";
diff --git a/pkgs/tools/filesystems/mtools/fix-dos_to_wchar-declaration.patch b/pkgs/tools/filesystems/mtools/fix-dos_to_wchar-declaration.patch
new file mode 100644
index 00000000000..576a14b1cb4
--- /dev/null
+++ b/pkgs/tools/filesystems/mtools/fix-dos_to_wchar-declaration.patch
@@ -0,0 +1,11 @@
+--- mtools-4.0.20.org/charsetConv.c	2018-11-19 10:16:14.183820865 +0000
++++ mtools-4.0.20/charsetConv.c	2018-11-19 10:15:39.808451465 +0000
+@@ -266,7 +266,7 @@
+ 	free(cp);
+ }
+ 
+-int dos_to_wchar(doscp_t *cp, char *dos, wchar_t *wchar, size_t len)
++int dos_to_wchar(doscp_t *cp, const char *dos, wchar_t *wchar, size_t len)
+ {
+ 	int i;
+