mingw: add osvi.patch

This is apparently a typo that has not been fixed.

Also remove unused configureFlags.
This commit is contained in:
Matthew Bauer 2018-08-07 10:20:13 -04:00
parent 9cee386f38
commit 744665e3c4
4 changed files with 14 additions and 5 deletions

View file

@ -8,9 +8,4 @@ rec {
url = "mirror://sourceforge/mingw-w64/mingw-w64-v${version}.tar.bz2";
sha256 = "00zq3z1hbzd5yzmskskjg79xrzwsqx7ihyprfaxy4hb897vf29sm";
};
configureFlags = [
"--enable-idl"
"--enable-secure-api"
];
}

View file

@ -5,4 +5,5 @@ stdenv.mkDerivation {
buildInputs = [ windows.mingw_w64_headers ];
dontStrip = true;
hardeningDisable = [ "stackprotector" "fortify" ];
patches = [ ./osvi.patch ];
}

View file

@ -7,6 +7,8 @@ in stdenvNoCC.mkDerivation {
name = name + "-headers";
inherit src;
patches = [ ./osvi.patch ];
preConfigure = ''
cd mingw-w64-headers
'';

View file

@ -0,0 +1,11 @@
--- a/mingw-w64-headers/include/multimon.h
+++ b/mingw-w64-headers/include/multimon.h
@@ -127,7 +127,7 @@
WINBOOL IsPlatformNT() {
OSVERSIONINFOA oi = { 0 };
- oi.dwOSVersionInfoSize = sizeof (osvi);
+ oi.dwOSVersionInfoSize = sizeof (oi);
GetVersionExA ((OSVERSIONINFOA *) &oi);
return (oi.dwPlatformId == VER_PLATFORM_WIN32_NT);
}