[Mono-dev] [RFC 09/12] console-unix: Workaround FIONREAD ioctl for Haiku

Andreas Färber andreas.faerber at web.de
Fri Mar 26 09:30:02 EDT 2010


This commit is licensed under the MIT X11 license.
---
 mono/metadata/console-unix.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/mono/metadata/console-unix.c b/mono/metadata/console-unix.c
index 7280b6f..324c0c1 100644
--- a/mono/metadata/console-unix.c
+++ b/mono/metadata/console-unix.c
@@ -159,10 +159,14 @@ ves_icall_System_ConsoleDriver_InternalKeyAvailable (gint32 timeout)
 	} while (ret == -1 && errno == EINTR);
 
 	if (ret > 0) {
+#ifdef __HAIKU__
+		ret = 0;
+#else
 		nbytes = 0;
 		ret = ioctl (STDIN_FILENO, FIONREAD, &nbytes);
 		if (ret >= 0)
 			ret = nbytes;
+#endif
 	}
 
 	return (ret > 0) ? ret : 0;
-- 
1.6.5.3



More information about the Mono-devel-list mailing list