From f7bcd099f5c421c85f4485a908dfe83708ff213d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 15 Sep 2005 19:00:25 +0200 Subject: [PATCH] Compile problem about "madvise()" on Solaris (bug#7156). (Patch supplied by Kent) --- include/my_global.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/my_global.h b/include/my_global.h index 5bfcef2820f..48dd165dba1 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 +#endif + /* The client defines this to avoid all thread code */ #if defined(UNDEF_THREADS_HACK) #undef THREAD