diff --git a/src/guiengine/widgets/rating_bar_widget.cpp b/src/guiengine/widgets/rating_bar_widget.cpp
index efaaa5566..83b76a67d 100644
--- a/src/guiengine/widgets/rating_bar_widget.cpp
+++ b/src/guiengine/widgets/rating_bar_widget.cpp
@@ -19,13 +19,22 @@
 #include "guiengine/modaldialog.hpp"
 #include "guiengine/widgets/rating_bar_widget.hpp"
 #include "utils/string_utils.hpp"
-#include <string.h>
 
 #include <IGUIEnvironment.h>
 #include <IGUIElement.h>
 #include <IGUIButton.h>
 #include <cmath>
 
+#ifdef WIN32
+// VS up to and including VS 2012 do not provide the normal round function
+static inline double round(double val)
+{    
+    return floor(val + 0.5);
+}
+#endif
+
+#include <string.h>
+
 using namespace GUIEngine;
 using namespace irr::core;
 using namespace irr;
diff --git a/src/network/protocol_manager.cpp b/src/network/protocol_manager.cpp
index c18c2e094..b57fd3d62 100644
--- a/src/network/protocol_manager.cpp
+++ b/src/network/protocol_manager.cpp
@@ -34,7 +34,7 @@ void* protocolManagerUpdate(void* data)
     while(!manager->exit())
     {
         manager->update();
-        usleep(20000);
+        irr_driver->getDevice()->sleep(20);
     }
     return NULL;
 }
@@ -44,7 +44,7 @@ void* protocolManagerAsynchronousUpdate(void* data)
     while(!manager->exit())
     {
         manager->asynchronousUpdate();
-        usleep(20000);
+        irr_driver->getDevice()->sleep(20);
     }
     return NULL;
 }
diff --git a/src/network/stk_host.cpp b/src/network/stk_host.cpp
index 817b58dea..1a2576a39 100644
--- a/src/network/stk_host.cpp
+++ b/src/network/stk_host.cpp
@@ -161,7 +161,7 @@ uint8_t* STKHost::receiveRawPacket()
     {
         i++;
         len = recv(m_host->socket,(char*)buffer,2048, 0);
-        usleep(1000);
+        irr_driver->getDevice()->sleep(1);
     }
     return buffer;
 }
@@ -186,7 +186,7 @@ uint8_t* STKHost::receiveRawPacket(TransportAddress* sender)
     {
         i++;
         len = recvfrom(m_host->socket, (char*)buffer, 2048, 0, &addr, &from_len);
-        usleep(1000); // wait 1 millisecond between two checks
+        irr_driver->getDevice()->sleep(1); // wait 1 millisecond between two checks
     }
     struct sockaddr_in *sin = (struct sockaddr_in *) (&addr);
     // we received the data
@@ -226,7 +226,7 @@ uint8_t* STKHost::receiveRawPacket(TransportAddress sender)
     {
         i++;
         len = recvfrom(m_host->socket, (char*)buffer, 2048, 0, &addr, &from_len);
-        usleep(1000); // wait 1 millisecond between two checks
+        irr_driver->getDevice()->sleep(1); // wait 1 millisecond between two checks
     }
     if (addr.sa_family == AF_INET)
     {