]> git.tdb.fi Git - libs/net.git/blobdiff - source/net/unix/socket.cpp
Include the matching header first in .cpp files
[libs/net.git] / source / net / unix / socket.cpp
index 970b9aedd3be443dff55e6500a296719041ea678..d87cdd3a72907109133929d5b8a405e6237cc2cf 100644 (file)
@@ -1,14 +1,16 @@
+#include "platform_api.h"
+#include "socket.h"
 #include <cerrno>
 #include <unistd.h>
 #include <fcntl.h>
-#include "platform_api.h"
 #include <msp/core/systemerror.h>
 #include <msp/io/handle_private.h>
 #include <msp/time/rawtime_private.h>
 #include "sockaddr_private.h"
-#include "socket.h"
 #include "socket_private.h"
 
+using namespace std;
+
 namespace Msp {
 namespace Net {
 
@@ -58,7 +60,7 @@ int Socket::Private::get_option(int level, int optname, void *optval, socklen_t
 }
 
 
-unsigned check_sys_error(int ret, const char *func)
+size_t check_sys_error(make_signed<size_t>::type ret, const char *func)
 {
        if(ret<0)
        {