forked from wavewave/nix-build-ghc-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unix-posix_vdisable.patch
21 lines (19 loc) · 1.01 KB
/
unix-posix_vdisable.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff -rupN a/libraries/unix/System/Posix/Terminal/Common.hsc b/libraries/unix/System/Posix/Terminal/Common.hsc
--- a/libraries/unix/System/Posix/Terminal/Common.hsc 2014-12-23 02:32:53.000000000 +0000
+++ b/libraries/unix/System/Posix/Terminal/Common.hsc 2015-09-19 04:33:13.765014640 +0000
@@ -262,7 +262,7 @@ controlChar termios cc = unsafePerformIO
withTerminalAttributes termios $ \p -> do
let c_cc = (#ptr struct termios, c_cc) p
val <- peekElemOff c_cc (cc2Word cc)
- if val == ((#const _POSIX_VDISABLE)::CCc)
+ if val == ((#const '\0')::CCc)
then return Nothing
else return (Just (chr (fromEnum val)))
@@ -280,7 +280,7 @@ withoutCC :: TerminalAttributes
withoutCC termios cc = unsafePerformIO $ do
withNewTermios termios $ \p -> do
let c_cc = (#ptr struct termios, c_cc) p
- pokeElemOff c_cc (cc2Word cc) ((#const _POSIX_VDISABLE) :: CCc)
+ pokeElemOff c_cc (cc2Word cc) ((#const '\0') :: CCc)
inputTime :: TerminalAttributes -> Int
inputTime termios = unsafePerformIO $ do