mtools: fix darwin build

This commit is contained in:
Jörg Thalheim 2018-11-19 10:19:19 +00:00
parent 4f99f26f9b
commit 47a239a240
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA
2 changed files with 13 additions and 1 deletions

View File

@ -10,7 +10,8 @@ stdenv.mkDerivation rec {
# Prevents errors such as "mainloop.c:89:15: error: expected ')'" # Prevents errors such as "mainloop.c:89:15: error: expected ')'"
# Upstream issue https://lists.gnu.org/archive/html/info-mtools/2014-02/msg00000.html # 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 # fails to find X on darwin
configureFlags = stdenv.lib.optional stdenv.isDarwin "--without-x"; configureFlags = stdenv.lib.optional stdenv.isDarwin "--without-x";

View File

@ -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;