diff --git a/Common/onelab.h b/Common/onelab.h
index 38a83fa6fa4f4638054f1dd81b1aa21ddb51d863..a6240d8e131901d44f7c4366d340836c9bf88261 100644
--- a/Common/onelab.h
+++ b/Common/onelab.h
@@ -35,6 +35,7 @@
 #include <set>
 #include <map>
 #include <iostream>
+#include <algorithm>
 #include <sstream>
 #include "GmshSocket.h"