summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/dlopen.c5
-rw-r--r--src/mesa/main/imports.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/main/dlopen.c b/src/mesa/main/dlopen.c
index 338246bb59b..94bec4a0887 100644
--- a/src/mesa/main/dlopen.c
+++ b/src/mesa/main/dlopen.c
@@ -36,7 +36,10 @@
#if defined(_WIN32)
#include <windows.h>
#endif
-
+#if defined(__HAIKU__)
+/* for NULL */
+#include <stdio.h>
+#endif
/**
* Wrapper for dlopen().
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index d28860f1702..4192f037c00 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -265,7 +265,8 @@ static INLINE int iround(float f)
}
#define IROUND(x) iround(x)
#elif defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) && \
- (!defined(__BEOS__) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)))
+ (!(defined(__BEOS__) || defined(__HAIKU__)) || \
+ (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)))
static INLINE int iround(float f)
{
int r;