[PATCH] Set _POSIX_VDISABLE to _PC_VDISABLE on android, because the former does not exist

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Set _POSIX_VDISABLE to _PC_VDISABLE on android, because the former does not exist

Nathan Hüsken
---
 System/Posix/Terminal/Common.hsc |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/System/Posix/Terminal/Common.hsc b/System/Posix/Terminal/Common.hsc
index 5d718a8..74c1f44 100644
--- a/System/Posix/Terminal/Common.hsc
+++ b/System/Posix/Terminal/Common.hsc
@@ -267,6 +267,11 @@ data ControlCharacter
   | Stop -- VSTOP
   | Suspend -- VSUSP
 
+#ifdef __ANDROID__
+-- the android ndk does not define this symbol
+#define _POSIX_VDISABLE _PC_VDISABLE
+#endif
+
 controlChar :: TerminalAttributes -> ControlCharacter -> Maybe Char
 controlChar termios cc = unsafePerformIO $ do
   withTerminalAttributes termios $ \p -> do
--
1.7.10.4


--------------070004030200010403000704
Content-Type: text/x-patch;
 name="03_unix_telldir_seekdir.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="03_unix_telldir_seekdir.patch"