summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2021-02-17 15:59:26 +0100
committerAndreas Klebinger <klebinger.andreas@gmx.at>2021-02-18 16:32:39 +0100
commit65c2ed0152ebd9ecf76c20a451654809876c0f5a (patch)
treefaeea902bacd3dab4b5864e296e51690d81141b7
parent963e1e9aedf0ee70d4e817640ec9845ed00ce0cf (diff)
downloadhaskell-wip/andreask/fix_timeout.tar.gz
Fix Storeable instances for the windows timeout executable.wip/andreask/fix_timeout
alignment clearly should be a power of two. This patch makes it so. We do so by using the #alignment directive instead of using the size of the type.
-rw-r--r--testsuite/timeout/WinCBindings.hsc4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/timeout/WinCBindings.hsc b/testsuite/timeout/WinCBindings.hsc
index 345cc4e3d7..983de3ae53 100644
--- a/testsuite/timeout/WinCBindings.hsc
+++ b/testsuite/timeout/WinCBindings.hsc
@@ -28,7 +28,7 @@ data PROCESS_INFORMATION = PROCESS_INFORMATION
instance Storable PROCESS_INFORMATION where
sizeOf = const #size PROCESS_INFORMATION
- alignment = sizeOf
+ alignment = const #alignment PROCESS_INFORMATION
poke buf pinfo = do
(#poke PROCESS_INFORMATION, hProcess) buf (piProcess pinfo)
(#poke PROCESS_INFORMATION, hThread) buf (piThread pinfo)
@@ -67,7 +67,7 @@ data STARTUPINFO = STARTUPINFO
instance Storable STARTUPINFO where
sizeOf = const #size STARTUPINFO
- alignment = sizeOf
+ alignment = const #alignment STARTUPINFO
poke buf si = do
(#poke STARTUPINFO, cb) buf (siCb si)
(#poke STARTUPINFO, lpDesktop) buf (siDesktop si)