on master help sign in
Add alignment definition for GHC-7.10.3
fae4b72Harendra Kumar
src/Streamly/FileSystem/IOVec.hsc+4
@@ -41,6 +41,10 @@ data IOVec = IOVec
41 , iovLen :: {-# UNPACK #-} !Word64
41 , iovLen :: {-# UNPACK #-} !Word64
42 } deriving (Eq, Show)
42 } deriving (Eq, Show)
43
43
44+#if __GLASGOW_HASKELL__ < 800
45+#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
46+#endif
47+
44instance Storable IOVec where
48instance Storable IOVec where
45 sizeOf _ = #{size struct iovec}
49 sizeOf _ = #{size struct iovec}
46 alignment _ = #{alignment struct iovec}
50 alignment _ = #{alignment struct iovec}