File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ module System.PosixCompat.Extensions (
1212 ) where
1313
1414
15- #ifndef mingw32_HOST_OS
15+ #if !(defined( mingw32_HOST_OS) || defined(wasm32_HOST_ARCH))
1616#include "HsUnixCompat.h"
1717#endif
1818
@@ -27,7 +27,7 @@ type CMinor = CUInt
2727--
2828-- The portable implementation always returns @0@.
2929deviceMajor :: DeviceID -> CMajor
30- #ifdef mingw32_HOST_OS
30+ #if defined( mingw32_HOST_OS) || defined(wasm32_HOST_ARCH)
3131deviceMajor _ = 0
3232#else
3333deviceMajor dev = unix_major dev
@@ -39,7 +39,7 @@ foreign import ccall unsafe "unix_major" unix_major :: CDev -> CUInt
3939--
4040-- The portable implementation always returns @0@.
4141deviceMinor :: DeviceID -> CMinor
42- #ifdef mingw32_HOST_OS
42+ #if defined( mingw32_HOST_OS) || defined(wasm32_HOST_ARCH)
4343deviceMinor _ = 0
4444#else
4545deviceMinor dev = unix_minor dev
@@ -49,7 +49,7 @@ foreign import ccall unsafe "unix_minor" unix_minor :: CDev -> CUInt
4949
5050-- | Creates a 'DeviceID' for a device file given a major and minor number.
5151makeDeviceID :: CMajor -> CMinor -> DeviceID
52- #ifdef mingw32_HOST_OS
52+ #if defined( mingw32_HOST_OS) || defined(wasm32_HOST_ARCH)
5353makeDeviceID _ _ = 0
5454#else
5555makeDeviceID ma mi = unix_makedev ma mi
Original file line number Diff line number Diff line change @@ -69,10 +69,11 @@ Library
6969
7070 else
7171 build-depends : unix >= 2.7.2.0 && < 2.9
72- include-dirs : include
73- includes : HsUnixCompat.h
74- install-includes : HsUnixCompat.h
75- c-sources : cbits/HsUnixCompat.c
72+ if !arch(wasm32)
73+ include-dirs : include
74+ includes : HsUnixCompat.h
75+ install-includes : HsUnixCompat.h
76+ c-sources : cbits/HsUnixCompat.c
7677 if os(solaris)
7778 cc-options : -DSOLARIS
7879
You can’t perform that action at this time.
0 commit comments