diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index 260266ee4fa8b8d0cc54ae593eaa54d9fe3c3d2c..fdad3339ba75ef57ab34902fc6825957d60ca6d0 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -11,7 +11,6 @@
 #include <sys/stat.h>
 #include "GmshConfig.h"
 #include "GmshMessage.h"
-#include "GmshSocket.h"
 #include "Gmsh.h"
 #include "GModel.h"
 #include "Options.h"
diff --git a/Common/GmshRemote.cpp b/Common/GmshRemote.cpp
index 154e1636ec1c7c6f2e1008cb0b693243c4999cf6..ed040b6e3aca461160d77a5670b09cfe5138e1ce 100644
--- a/Common/GmshRemote.cpp
+++ b/Common/GmshRemote.cpp
@@ -9,7 +9,7 @@
 
 #if defined(HAVE_ONELAB) && defined(HAVE_POST)
 
-#include "GmshSocket.h"
+#include "onelab.h"
 #include "OpenFile.h"
 #include "OS.h"
 #include "VertexArray.h"
diff --git a/Post/PViewDataRemote.h b/Post/PViewDataRemote.h
index 8e7a14eca0e5f57a8a5586548ef1d4454a83056c..759243566e8e67a33a774a4e2d4e759c7de75631 100644
--- a/Post/PViewDataRemote.h
+++ b/Post/PViewDataRemote.h
@@ -9,7 +9,6 @@
 #include <vector>
 #include <string>
 #include "GmshMessage.h"
-#include "GmshSocket.h"
 #include "PViewData.h"
 #include "SBoundingBox3d.h"
 #include "onelab.h"