Skip to content

Commit 302a63b

Browse files
authored
Use capi rather than ccall (#163)
As noted by GHC #20085, the ccall calling convention does not support variadic functions.
1 parent c03e702 commit 302a63b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

System/Console/Haskeline/Backend/Posix.hsc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{-# LANGUAGE CApiFFI #-}
2+
13
module System.Console.Haskeline.Backend.Posix (
24
withPosixGetEvent,
35
posixLayouts,
@@ -61,7 +63,7 @@ ehOut = eH . hOut
6163
-------------------
6264
-- Window size
6365

64-
foreign import ccall ioctl :: FD -> CULong -> Ptr a -> IO CInt
66+
foreign import capi "sys/ioctl.h ioctl" ioctl :: FD -> CULong -> Ptr a -> IO CInt
6567

6668
posixLayouts :: Handles -> [IO (Maybe Layout)]
6769
posixLayouts h = [ioctlLayout $ ehOut h, envLayout]

0 commit comments

Comments
 (0)