[Orxonox-commit 2730] r7435 - in code/branches/ipv6/src/external/enet: . include/enet
landauf at orxonox.net
landauf at orxonox.net
Sun Sep 12 22:56:19 CEST 2010
Author: landauf
Date: 2010-09-12 22:56:19 +0200 (Sun, 12 Sep 2010)
New Revision: 7435
Modified:
code/branches/ipv6/src/external/enet/CMakeLists.txt
code/branches/ipv6/src/external/enet/include/enet/enet.h
code/branches/ipv6/src/external/enet/protocol.c
code/branches/ipv6/src/external/enet/win32.c
Log:
build fixes for MinGW
Modified: code/branches/ipv6/src/external/enet/CMakeLists.txt
===================================================================
--- code/branches/ipv6/src/external/enet/CMakeLists.txt 2010-09-12 20:31:49 UTC (rev 7434)
+++ code/branches/ipv6/src/external/enet/CMakeLists.txt 2010-09-12 20:56:19 UTC (rev 7435)
@@ -28,6 +28,8 @@
include/enet/utility.h
include/enet/win32.h
+ win32.c
+
COMPILATION_BEGIN ENetCompilation.c
callbacks.c
compress.c
@@ -37,7 +39,6 @@
peer.c
protocol.c
unix.c
- win32.c
COMPILATION_END
)
Modified: code/branches/ipv6/src/external/enet/include/enet/enet.h
===================================================================
--- code/branches/ipv6/src/external/enet/include/enet/enet.h 2010-09-12 20:31:49 UTC (rev 7434)
+++ code/branches/ipv6/src/external/enet/include/enet/enet.h 2010-09-12 20:56:19 UTC (rev 7435)
@@ -59,11 +59,11 @@
} ENetHostAddress;
#define ENET_HOST_ANY_INIT { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } /**< specifies the default server host (macro for variable initialization) */
-ENET_API const ENetHostAddress ENET_HOST_ANY; /**< specifies the default server host (global constant variable) */
+static const ENetHostAddress ENET_HOST_ANY = ENET_HOST_ANY_INIT; /**< specifies the default server host (global constant variable) */
#define ENET_IPV4MAPPED_PREFIX_INIT { { 0,0,0,0,0,0,0,0,0,0,0xff,0xff,0,0,0,0 } } /**< specifies the IPv4-mapped IPv6 prefix (macro for variable initialization) */
-ENET_API const ENetHostAddress ENET_IPV4MAPPED_PREFIX; /**< specifies the IPv4-mapped IPv6 prefix (global constant variable) */
+static const ENetHostAddress ENET_IPV4MAPPED_PREFIX = ENET_IPV4MAPPED_PREFIX_INIT; /**< specifies the IPv4-mapped IPv6 prefix (global constant variable) */
#define ENET_HOST_BROADCAST_INIT { { 0,0,0,0,0,0,0,0,0,0,0xff,0xff,0xff,0xff,0xff,0xff } } /**< specifies a IPv4 subnet-wide broadcast (macro for variable initialization) */
-ENET_API const ENetHostAddress ENET_HOST_BROADCAST; /**< specifies a IPv4 subnet-wide broadcast (global constant variable) */
+static const ENetHostAddress ENET_HOST_BROADCAST = ENET_HOST_BROADCAST_INIT; /**< specifies a IPv4 subnet-wide broadcast (global constant variable) */
enum {
ENET_IPV4MAPPED_PREFIX_LEN = 12, /**< specifies the length of the IPv4-mapped IPv6 prefix */
ENET_PORT_ANY = 0 /**< specifies that a port should be automatically chosen */
Modified: code/branches/ipv6/src/external/enet/protocol.c
===================================================================
--- code/branches/ipv6/src/external/enet/protocol.c 2010-09-12 20:31:49 UTC (rev 7434)
+++ code/branches/ipv6/src/external/enet/protocol.c 2010-09-12 20:56:19 UTC (rev 7435)
@@ -9,10 +9,6 @@
#include "enet/time.h"
#include "enet/enet.h"
-const ENetHostAddress ENET_HOST_ANY = ENET_HOST_ANY_INIT;
-const ENetHostAddress ENET_IPV4MAPPED_PREFIX = ENET_IPV4MAPPED_PREFIX_INIT;
-const ENetHostAddress ENET_HOST_BROADCAST = ENET_HOST_BROADCAST_INIT;
-
static size_t commandSizes [ENET_PROTOCOL_COMMAND_COUNT] =
{
0,
Modified: code/branches/ipv6/src/external/enet/win32.c
===================================================================
--- code/branches/ipv6/src/external/enet/win32.c 2010-09-12 20:31:49 UTC (rev 7434)
+++ code/branches/ipv6/src/external/enet/win32.c 2010-09-12 20:56:19 UTC (rev 7435)
@@ -3,6 +3,8 @@
@brief ENet Win32 system specific functions
*/
#ifdef WIN32
+
+#define _WIN32_WINNT 0x0501
#include <time.h>
#define ENET_BUILDING_LIB 1
@@ -125,8 +127,12 @@
struct addrinfo * result;
struct addrinfo * res;
- memset(& hints, 0, sizeof (hints));
- hints.ai_flags = AI_ADDRCONFIG;
+ memset(& hints, 0, sizeof (hints));
+#ifdef AI_ADDRCONFIG
+ hints.ai_flags = AI_ADDRCONFIG;
+#else
+ hints.ai_flags = 0x0400; // AI_ADDRCONFIG is defined as 0x0400
+#endif
hints.ai_family = AF_UNSPEC;
if ( getaddrinfo(name, NULL, &hints, &result) )
More information about the Orxonox-commit
mailing list