mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-05 15:45:04 -04:00
Fixed compile of the libraries with MinGW 4.8 on Windows.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6814 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9b8d597c0d
commit
13e7ac8b43
11 changed files with 26 additions and 20 deletions
|
@ -201,8 +201,10 @@ win32 {
|
|||
QMAKE_CC = g++
|
||||
OBJECTS_DIR = temp/obj
|
||||
MOC_DIR = temp/moc
|
||||
DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW
|
||||
DEFINES *= WINDOWS_SYS WIN32 STATICLIB MINGW WIN32_LEAN_AND_MEAN _USE_32BIT_TIME_T
|
||||
DEFINES *= MINIUPNPC_VERSION=13
|
||||
# This defines the platform to be WinXP or later and is needed for getaddrinfo (_WIN32_WINNT_WINXP)
|
||||
DEFINES *= WINVER=0x0501
|
||||
DESTDIR = lib
|
||||
|
||||
# Switch on extra warnings
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include "dlfcn_win32.h"
|
||||
|
||||
|
|
|
@ -362,7 +362,11 @@ bool getLocalInterfaces(struct in_addr &routeAddr, std::list<struct in_addr> &ad
|
|||
addr.s_addr = ipaddr.dwAddr;
|
||||
rs_sprintf(out, "Iface(%ld) => %s\n", ipaddr.dwIndex, rs_inet_ntoa(addr).c_str());
|
||||
|
||||
#if __MINGW_MAJOR_VERSION <= 3
|
||||
unsigned short wType = ipaddr.unused2; // should be wType
|
||||
#else
|
||||
unsigned short wType = ipaddr.wType;
|
||||
#endif
|
||||
if (wType & MIB_IPADDR_DISCONNECTED)
|
||||
{
|
||||
pqioutput(PQL_DEBUG_BASIC, pqinetzone, "Interface disconnected, " + out);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#ifdef WINDOWS_SYS
|
||||
#include <windows.h>
|
||||
#include <malloc.h>
|
||||
#else
|
||||
#include <vector>
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -28,17 +28,8 @@
|
|||
#ifndef RSWIN_H_
|
||||
#define RSWIN_H_
|
||||
|
||||
|
||||
#ifdef WINDOWS_SYS
|
||||
|
||||
#ifdef _WIN32_WINNT
|
||||
#error "Please include \"util/rswin.h\" *before* any other one as _WIN32_WINNT needs to predefined"
|
||||
#endif
|
||||
|
||||
// This defines the platform to be WinXP or later and is needed for getaddrinfo
|
||||
// It must be declared before pthread.h includes windows.h
|
||||
#define _WIN32_WINNT 0x0501
|
||||
|
||||
#include <windows.h>
|
||||
#include <string>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue