Fix some Windows build errors:

* Cast to correct datatype for Winsock API
* Replace non-standard u_int32_t
* Add missing link dependency of timelineDecoder on armnn
* Don't try to link pthread if the platform doesn't have it
* Use abstracted Socket type rather than int
* Link to WinSock DLL on windows

Change-Id: I9ace4af50257ce1e3da92fb4c452f36775dac973
Signed-off-by: Robert Hughes <robert.hughes@arm.com>
diff --git a/profiling/common/include/NetworkSockets.hpp b/profiling/common/include/NetworkSockets.hpp
index b9e58aa..7750764 100644
--- a/profiling/common/include/NetworkSockets.hpp
+++ b/profiling/common/include/NetworkSockets.hpp
@@ -34,6 +34,8 @@
 
 using Socket = SOCKET;
 using PollFd = WSAPOLLFD;
+using nfds_t = int;
+using socklen_t = int;
 #define SOCK_CLOEXEC 0
 
 #endif
diff --git a/profiling/common/include/SocketConnectionException.hpp b/profiling/common/include/SocketConnectionException.hpp
index 58b8a14..fceaa0f 100644
--- a/profiling/common/include/SocketConnectionException.hpp
+++ b/profiling/common/include/SocketConnectionException.hpp
@@ -8,6 +8,8 @@
 #include <stdexcept>
 #include <string>
 
+#include "NetworkSockets.hpp"
+
 namespace armnnProfiling
 {
 
@@ -15,11 +17,11 @@
 class SocketConnectionException : public std::exception
 {
 public:
-    explicit SocketConnectionException(const std::string& message, int socket)
+    explicit SocketConnectionException(const std::string& message, armnnUtils::Sockets::Socket socket)
     : m_Message(message), m_Socket(socket), m_ErrNo(-1)
     {};
 
-    explicit SocketConnectionException(const std::string& message, int socket, int errNo)
+    explicit SocketConnectionException(const std::string& message, armnnUtils::Sockets::Socket socket, int errNo)
     : m_Message(message), m_Socket(socket), m_ErrNo(errNo)
     {};
 
@@ -31,7 +33,7 @@
 
     /// @return - Socket File Descriptor of SocketProfilingConnection
     ///           or '-1', an invalid file descriptor
-    int GetSocketFd() const noexcept
+    armnnUtils::Sockets::Socket GetSocketFd() const noexcept
     {
         return m_Socket;
     }
@@ -44,7 +46,7 @@
 
 private:
     std::string m_Message;
-    int m_Socket;
+    armnnUtils::Sockets::Socket m_Socket;
     int m_ErrNo;
 };
 
diff --git a/profiling/common/src/NetworkSockets.cpp b/profiling/common/src/NetworkSockets.cpp
index 8ce5f19..1e1f701 100644
--- a/profiling/common/src/NetworkSockets.cpp
+++ b/profiling/common/src/NetworkSockets.cpp
@@ -52,7 +52,7 @@
 #if defined(__unix__)
     return write(s, buf, len);
 #elif defined(_MSC_VER)
-    return send(s, static_cast<const char*>(buf), len, 0);
+    return send(s, static_cast<const char*>(buf), static_cast<int>(len), 0);
 #endif
 }
 
@@ -62,7 +62,7 @@
 #if defined(__unix__)
     return read(s, buf, len);
 #elif defined(_MSC_VER)
-    return recv(s, static_cast<char*>(buf), len, 0);
+    return recv(s, static_cast<char*>(buf), static_cast<int>(len), 0);
 #endif
 }