Fixex VS compilation: need to link with Iphlpapi.lib,
and apparently 'interface' is reserved (or #defined) in VS. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@13583 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
de14757419
commit
dadca72349
@ -236,6 +236,9 @@ if(APPLE)
|
||||
# CMake pick the library it wants essentially means I can't build.
|
||||
set_target_properties(supertuxkart PROPERTIES LINK_FLAGS "-arch i386 -F/Library/Frameworks -framework OpenAL -framework Ogg -framework Vorbis")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/Library/Frameworks/OpenAL.framework/Versions/A/Headers")
|
||||
elseif(MSVC)
|
||||
# We need to link with Iphlpapi.lib for some networking support:
|
||||
target_link_libraries(supertuxkart "Iphlpapi.lib")
|
||||
endif()
|
||||
|
||||
if(USE_FRIBIDI)
|
||||
|
@ -28,7 +28,12 @@
|
||||
#include "utils/random_generator.hpp"
|
||||
|
||||
#include <assert.h>
|
||||
#include <netdb.h>
|
||||
#ifdef WIN32
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
#else
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
int stunRand()
|
||||
@ -117,9 +122,9 @@ void GetPublicAddress::asynchronousUpdate()
|
||||
}
|
||||
for(p = res;p != NULL; p = p->ai_next)
|
||||
{
|
||||
struct sockaddr_in* interface = (struct sockaddr_in*)(p->ai_addr);
|
||||
struct sockaddr_in* current_interface = (struct sockaddr_in*)(p->ai_addr);
|
||||
|
||||
m_stun_server_ip = ntohl(interface->sin_addr.s_addr);
|
||||
m_stun_server_ip = ntohl(current_interface->sin_addr.s_addr);
|
||||
NetworkManager::getInstance()->setManualSocketsMode(true);
|
||||
NetworkManager::getInstance()->getHost()->sendRawPacket(bytes, 20, TransportAddress(m_stun_server_ip, 3478));
|
||||
m_state = TEST_SENT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user