diff --git a/ndb/src/common/util/basestring_vsnprintf.c b/ndb/src/common/util/basestring_vsnprintf.c
index 58203e33bd1f887f34d7faf7068836cbaf2079e4..f5d01fb1532d4bf10301f6e7217c2809c715bd61 100644
--- a/ndb/src/common/util/basestring_vsnprintf.c
+++ b/ndb/src/common/util/basestring_vsnprintf.c
@@ -14,8 +14,10 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
+#ifdef __sgi
 /* define on IRIX to get posix compliant vsnprintf */
 #define _XOPEN_SOURCE 500
+#endif
 #include <stdio.h>
 #include <basestring_vsnprintf.h>
 #include <my_config.h>