changeset 2939:e992e9f9bedd draft

We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)
author Timothy Redaelli <timothy.redaelli@gmail.com>
date Wed, 25 Apr 2012 14:07:24 +0200
parents 7791ca0f682d
children 65524d1f72f6
files src/net.cpp src/protocol.cpp src/protocol.h
diffstat 3 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -12,6 +12,8 @@
 
 #ifdef WIN32
 #include <string.h>
+#else
+#include <netinet/in.h>
 #endif
 
 #ifdef USE_UPNP
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -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
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -10,6 +10,10 @@
 #ifndef __INCLUDED_PROTOCOL_H__
 #define __INCLUDED_PROTOCOL_H__
 
+#ifndef WIN32
+#include <netinet/in.h>
+#endif
+
 #include "serialize.h"
 #include <string>
 #include "uint256.h"