blob: 529f83579f0d959da6298b633cddfec7f0fc9ab1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$NetBSD: patch-lib_Filesystem.hs,v 1.1 2022/02/24 01:21:55 pho Exp $
Use the correct symbol for opendir(3) by using CApiFFI, required on NetBSD.
--- lib/Filesystem.hs.orig 2022-02-21 08:32:13.199111538 +0000
+++ lib/Filesystem.hs
@@ -1,5 +1,6 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE CApiFFI #-}
-- |
-- Module: Filesystem
@@ -351,7 +352,7 @@ readDir (Dir _ p) dirent = do
return (Just bytes)
else return Nothing
-foreign import ccall unsafe "opendir"
+foreign import capi unsafe "dirent.h opendir"
c_opendir :: CString -> IO (Ptr ())
foreign import ccall unsafe "closedir"
|