[Mono-dev] [PATCH v2 07/10] console-unix: Compile fix for Haiku

Andreas Färber andreas.faerber at web.de
Mon Mar 29 18:56:15 EDT 2010


FIONREAD is defined in sys/ioctl.h on Haiku.

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

diff --git a/mono/metadata/console-unix.c b/mono/metadata/console-unix.c
index 7280b6f..c33de93 100644
--- a/mono/metadata/console-unix.c
+++ b/mono/metadata/console-unix.c
@@ -43,7 +43,8 @@
 #ifdef HAVE_SYS_FILIO_H
 #    include <sys/filio.h>
 #endif
-#ifndef TIOCGWINSZ
+/* Haiku has FIONREAD in sys/ioctl.h */
+#if !defined(TIOCGWINSZ) || !defined(FIONREAD)
 #    ifdef HAVE_SYS_IOCTL_H
 #        include <sys/ioctl.h>
 #    endif
-- 
1.7.0.3



More information about the Mono-devel-list mailing list