diff --git a/Geo/GEdgeLoop.cpp b/Geo/GEdgeLoop.cpp
index eb51d58c221ced1759670d51ddace49a13971f44..d6401b31a59753e91baea409420d75d206deeaa4 100644
--- a/Geo/GEdgeLoop.cpp
+++ b/Geo/GEdgeLoop.cpp
@@ -1,4 +1,4 @@
-// $Id: GEdgeLoop.cpp,v 1.7 2008-01-14 21:29:13 remacle Exp $
+// $Id: GEdgeLoop.cpp,v 1.8 2008-01-20 11:19:27 geuzaine Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -19,6 +19,7 @@
 // 
 // Please report all bugs and problems to <gmsh@geuz.org>.
 
+#include <algorithm>
 #include "GEdgeLoop.h"
 #include "Message.h"
 
diff --git a/contrib/NR/nrutil.cpp b/contrib/NR/nrutil.cpp
index 8aeaf3a79eec86888bd2a29bb663f0a7e13dbe7b..627300c37c60b722d6887fd3b137ee0804abb674 100644
--- a/contrib/NR/nrutil.cpp
+++ b/contrib/NR/nrutil.cpp
@@ -7,7 +7,7 @@
 #define NR_END 1
 #define FREE_ARG char*
 
-#include "Gmsh.h"
+#include "Message.h"
 
 void nrerror(char error_text[])
 /* Numerical Recipes standard error handler */
diff --git a/contrib/NR/nrutil.h b/contrib/NR/nrutil.h
index 6deadd08b165b9f6c07a50b771e82a62e3b39aaa..dc6e7af56b5b158364a12f9b7bad73fd86bfb59e 100644
--- a/contrib/NR/nrutil.h
+++ b/contrib/NR/nrutil.h
@@ -4,7 +4,7 @@
 /* This file has been modified for inclusion in Gmsh */
 
 /* Gmsh: */
-#include "Gmsh.h"
+#include <math.h>
 #include "Numeric.h"
 
 /* Gmsh: