diff --git a/cluster.cc b/cluster.cc
index 20e792d28a4995adc173861561064a1bba336df5..697c3c79cbdefcc7f331e39ff4305ea51312579b 100644
--- a/cluster.cc
+++ b/cluster.cc
@@ -14,6 +14,9 @@
 #include "infer.h"
 #include "options.h"
 
+#define _GNU_SOURCE 1
+#define POSIX_SOURCE 1
+
 using namespace NEWIMAGE;
 using std::vector;
 using namespace Utilities;