diff options
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llhost.cpp | 20 | ||||
-rw-r--r-- | indra/llmessage/llmail.cpp | 7 | ||||
-rw-r--r-- | indra/llmessage/llmail.h | 2 | ||||
-rw-r--r-- | indra/llmessage/net.cpp | 18 |
4 files changed, 30 insertions, 17 deletions
diff --git a/indra/llmessage/llhost.cpp b/indra/llmessage/llhost.cpp index f4a1740663..501d9465c2 100644 --- a/indra/llmessage/llhost.cpp +++ b/indra/llmessage/llhost.cpp @@ -8,19 +8,21 @@ #include "linden_common.h" - -#if !LL_WINDOWS -#include <netdb.h> -#include <netinet/in.h> // ntonl() -#include <sys/types.h> -#include <sys/socket.h> -#include <arpa/inet.h> -#endif - #include "llhost.h" #include "llerror.h" +#if LL_WINDOWS + #define WIN32_LEAN_AND_MEAN + #include <winsock2.h> +#else + #include <netdb.h> + #include <netinet/in.h> // ntonl() + #include <sys/types.h> + #include <sys/socket.h> + #include <arpa/inet.h> +#endif + LLHost LLHost::invalid(INVALID_PORT,INVALID_HOST_IP_ADDRESS); LLHost::LLHost(const std::string& ip_and_port) diff --git a/indra/llmessage/llmail.cpp b/indra/llmessage/llmail.cpp index 9fe8e89b20..4dd550901e 100644 --- a/indra/llmessage/llmail.cpp +++ b/indra/llmessage/llmail.cpp @@ -8,6 +8,13 @@ #include "linden_common.h" +// APR on Windows needs full windows headers +#ifdef LL_WINDOWS +# undef WIN32_LEAN_AND_MEAN +# include <winsock2.h> +# include <windows.h> +#endif + #include <string> #include <sstream> #include <boost/regex.hpp> diff --git a/indra/llmessage/llmail.h b/indra/llmessage/llmail.h index e34b827f5f..af02264776 100644 --- a/indra/llmessage/llmail.h +++ b/indra/llmessage/llmail.h @@ -9,7 +9,7 @@ #ifndef LL_LLMAIL_H #define LL_LLMAIL_H -#include "apr-1/apr_pools.h" +typedef struct apr_pool_t apr_pool_t; // if hostname is NULL, then the host is resolved as 'mail' void init_mail(const std::string& hostname, apr_pool_t* pool); diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp index 2b712840d8..bf8927c7b9 100644 --- a/indra/llmessage/net.cpp +++ b/indra/llmessage/net.cpp @@ -14,13 +14,17 @@ #include <stdexcept> #include <stdio.h> -#if !LL_WINDOWS // Windows Versions -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <fcntl.h> -#include <errno.h> +#if LL_WINDOWS + #define WIN32_LEAN_AND_MEAN + #include <winsock2.h> + #include <windows.h> +#else + #include <sys/types.h> + #include <sys/socket.h> + #include <netinet/in.h> + #include <arpa/inet.h> + #include <fcntl.h> + #include <errno.h> #endif // linden library includes |