summaryrefslogtreecommitdiff
path: root/include/my_global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_global.h')
-rw-r--r--include/my_global.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 5bfcef2820f..b32a8fe6baa 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -107,6 +107,14 @@
#define _GNU_SOURCE 1
#endif
+/*
+ Temporary solution to solve bug#7156. Include "sys/types.h" before
+ the thread headers, else the function madvise() will not be defined
+*/
+#if defined(HAVE_SYS_TYPES_H) && ( defined(sun) || defined(__sun) )
+#include <sys/types.h>
+#endif
+
/* The client defines this to avoid all thread code */
#if defined(UNDEF_THREADS_HACK)
#undef THREAD
@@ -230,7 +238,7 @@ C_MODE_END
/* Fix a bug in gcc 2.8.0 on IRIX 6.2 */
-#if SIZEOF_LONG == 4 && defined(__LONG_MAX__)
+#if SIZEOF_LONG == 4 && defined(__LONG_MAX__) && (__GNUC__ == 2 && __GNUC_MINOR__ == 8)
#undef __LONG_MAX__ /* Is a longlong value in gcc 2.8.0 ??? */
#define __LONG_MAX__ 2147483647
#endif