Skip to content
Snippets Groups Projects
Commit 9e15db49 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

KQueue.hsc: fix build failure on FreeBSD


Build failed as:
  libraries/base/GHC/Event/KQueue.hsc:192:25: error:
      Not in scope: type constructor or class ‘Int16’
      |
  192 | newtype Filter = Filter Int16
      |                         ^^^^^

If was caused by an import tweak from Word16 to Int16.
Adjust imports to make KQueue compile cleanly.

Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>

Test Plan: build on freebsd

Reviewers: bgamari, austin, hvr

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3300
parent 87a2d37c
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@ available = False
#else
import Data.Bits (Bits(..), FiniteBits(..))
import qualified Data.Int as I
import Data.Word (Word16, Word32)
import Data.Int (Int16)
import Foreign.C.Error (throwErrnoIfMinus1, eINTR, eINVAL,
......@@ -188,9 +189,9 @@ newtype Flag = Flag Word16
}
#if SIZEOF_KEV_FILTER == 4 /*kevent.filter: int32_t or int16_t. */
newtype Filter = Filter Int32
newtype Filter = Filter I.Int32
#else
newtype Filter = Filter Int16
newtype Filter = Filter I.Int16
#endif
deriving (Bits, FiniteBits, Eq, Num, Show, Storable)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment