summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2021-02-17 15:59:26 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-02-22 18:27:10 -0500
commit847b0a6950ffdead534d0d4982f50ad17ae7cce0 (patch)
treeca1cb4f9812f149fd952368548d3a74ed3b78d8c
parentf78f4597a4651c8a11409c30e0d21c1e918b0825 (diff)
downloadhaskell-847b0a6950ffdead534d0d4982f50ad17ae7cce0.tar.gz
Fix Storeable instances for the windows timeout executable.
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)