haskellPackages.basement: apply patch for integer cast
Fixes error: Size.hsc:126:30: error: initialization of ‘long long int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
This commit is contained in:
@@ -494,15 +494,20 @@ with haskellLib;
|
||||
jpeg-turbo = dontCheck super.jpeg-turbo;
|
||||
JuicyPixels-jpeg-turbo = dontCheck super.JuicyPixels-jpeg-turbo;
|
||||
|
||||
# Fixes compilation for basement on i686
|
||||
# https://github.com/haskell-foundation/foundation/pull/573
|
||||
basement = appendPatches [
|
||||
# Fixes compilation for basement on i686
|
||||
# https://github.com/haskell-foundation/foundation/pull/573
|
||||
(fetchpatch {
|
||||
name = "basement-i686-ghc-9.4.patch";
|
||||
url = "https://github.com/haskell-foundation/foundation/pull/573/commits/38be2c93acb6f459d24ed6c626981c35ccf44095.patch";
|
||||
sha256 = "17kz8glfim29vyhj8idw8bdh3id5sl9zaq18zzih3schfvyjppj7";
|
||||
stripLen = 1;
|
||||
})
|
||||
|
||||
# Fixes compilation on windows
|
||||
# Repo is archived, package is abandoned: https://github.com/haskell-foundation/foundation
|
||||
./patches/basement-add-cast.patch
|
||||
|
||||
] super.basement;
|
||||
|
||||
# Fixes compilation of memory with GHC >= 9.4 on 32bit platforms
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/Basement/Terminal/Size.hsc b/Basement/Terminal/Size.hsc
|
||||
index 62c315e..4bfe0ad 100644
|
||||
--- a/Basement/Terminal/Size.hsc
|
||||
+++ b/Basement/Terminal/Size.hsc
|
||||
@@ -121,7 +121,7 @@ instance Storable ConsoleScreenBufferInfo where
|
||||
#{poke CONSOLE_SCREEN_BUFFER_INFO, dwMaximumWindowSize} ptr m
|
||||
|
||||
invalidHandleValue :: IntPtr
|
||||
-invalidHandleValue = #{const INVALID_HANDLE_VALUE}
|
||||
+invalidHandleValue = IntPtr $ #{const (long long int)INVALID_HANDLE_VALUE}
|
||||
|
||||
stdOutputHandle :: CULong
|
||||
stdOutputHandle = #{const STD_OUTPUT_HANDLE}
|
||||
Reference in New Issue
Block a user