Index: /trunk/docs/Changelog
===================================================================
--- /trunk/docs/Changelog	(revision 522)
+++ /trunk/docs/Changelog	(revision 523)
@@ -1,3 +1,4 @@
 4.2.1:
+	* fix compile issue on Solaris 11 (reported by Rolf)
 	* fix alignment problem with semget() (reported by Rolf)
 	* fix dependency on chkconfig package on Redhat/CentOS: search
Index: /trunk/src/slib.c
===================================================================
--- /trunk/src/slib.c	(revision 522)
+++ /trunk/src/slib.c	(revision 523)
@@ -2,5 +2,11 @@
 
 #if defined(HAVE_POSIX_FADVISE) && defined(HAVE_MINCORE)
+
+#if defined(__sun) || defined(__sun__) || defined(sun)
+#define _XOPEN_SOURCE 500
+#else
 #define _XOPEN_SOURCE 600
+#endif
+
 #define _BSD_SOURCE
 #endif
