We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)
[novacoin.git] / src / protocol.cpp
index f46570e..16ad746 100644 (file)
@@ -8,6 +8,7 @@
 
 #ifndef WIN32
 # include <arpa/inet.h>
+# include <netinet/in.h>
 #endif
 
 // Prototypes from net.h, but that header (currently) stinks, can't #include it without breaking things
@@ -270,7 +271,7 @@ CInv::CInv(int typeIn, const uint256& hashIn)
 
 CInv::CInv(const std::string& strType, const uint256& hashIn)
 {
-    int i;
+    unsigned int i;
     for (i = 1; i < ARRAYLEN(ppszTypeName); i++)
     {
         if (strType == ppszTypeName[i])