Merge remote-tracking branch 'pali/master'
This commit is contained in:
commit
39f531bbd6
33
.travis.yml
33
.travis.yml
|
@ -35,6 +35,39 @@ jobs:
|
|||
env: PROJECT=miniupnpd
|
||||
- os: osx
|
||||
compiler: gcc
|
||||
include:
|
||||
- os: linux
|
||||
dist: trusty
|
||||
env: PROJECT=miniupnpc
|
||||
compiler: i586-mingw32msvc-gcc
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- mingw32
|
||||
before_install: true
|
||||
after_success: true
|
||||
before_script: i586-mingw32msvc-gcc -v 2>&1 | grep -q -x 'Target: i586-mingw32msvc'
|
||||
script: make -C miniupnpc -f Makefile.mingw CC=i586-mingw32msvc-gcc DLLWRAP=i586-mingw32msvc-dllwrap AR=i586-mingw32msvc-ar
|
||||
- os: linux
|
||||
env: PROJECT=miniupnpc
|
||||
compiler: i686-w64-mingw32-gcc
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-mingw-w64-i686
|
||||
before_install: true
|
||||
after_success: true
|
||||
script: make -C miniupnpc -f Makefile.mingw CC=i686-w64-mingw32-gcc DLLWRAP=i686-w64-mingw32-dllwrap AR=i686-w64-mingw32-ar
|
||||
- os: linux
|
||||
env: PROJECT=miniupnpc
|
||||
compiler: x86_64-w64-mingw32-gcc
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-mingw-w64-x86-64
|
||||
before_install: true
|
||||
after_success: true
|
||||
script: make -C miniupnpc -f Makefile.mingw CC=x86_64-w64-mingw32-gcc DLLWRAP=x86_64-w64-mingw32-dllwrap AR=x86_64-w64-mingw32-ar
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
|
|
|
@ -56,7 +56,7 @@ int addr_is_reserved(const char * addr_str)
|
|||
uint32_t addr_n, address;
|
||||
size_t i;
|
||||
|
||||
#if defined(_WIN32) && (_WIN32_WINNT < _WIN32_WINNT_VISTA)
|
||||
#if defined(_WIN32) && (!defined(_WIN32_WINNT_VISTA) || (_WIN32_WINNT < _WIN32_WINNT_VISTA))
|
||||
addr_n = inet_addr(addr_str);
|
||||
if (addr_n == INADDR_NONE)
|
||||
return 1;
|
||||
|
|
|
@ -454,7 +454,7 @@ parseMSEARCHReply(const char * reply, int size,
|
|||
static int upnp_gettimeofday(struct timeval * tv)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
|
||||
#if defined(_WIN32_WINNT_VISTA) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
|
||||
ULONGLONG ts = GetTickCount64();
|
||||
#else
|
||||
DWORD ts = GetTickCount();
|
||||
|
@ -570,12 +570,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
|
|||
* in order to give this ip to setsockopt(sudp, IPPROTO_IP, IP_MULTICAST_IF) */
|
||||
if(!ipv6) {
|
||||
DWORD ifbestidx;
|
||||
SOCKADDR_IN destAddr;
|
||||
memset(&destAddr, 0, sizeof(destAddr));
|
||||
destAddr.sin_family = AF_INET;
|
||||
destAddr.sin_addr.s_addr = inet_addr("223.255.255.255");
|
||||
destAddr.sin_port = 0;
|
||||
if (GetBestInterfaceEx((struct sockaddr *)&destAddr, &ifbestidx) == NO_ERROR) {
|
||||
if (GetBestInterface(inet_addr("223.255.255.255"), &ifbestidx) == NO_ERROR) {
|
||||
DWORD dwRetVal = NO_ERROR;
|
||||
PIP_ADAPTER_ADDRESSES pAddresses = NULL;
|
||||
ULONG outBufLen = 15360;
|
||||
|
@ -714,7 +709,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
|
|||
} else {
|
||||
struct in_addr mc_if;
|
||||
#if defined(_WIN32)
|
||||
#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
|
||||
#if defined(_WIN32_WINNT_VISTA) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
|
||||
InetPtonA(AF_INET, multicastif, &mc_if);
|
||||
#else
|
||||
mc_if.s_addr = inet_addr(multicastif); /* old Windows SDK do not support InetPtoA() */
|
||||
|
|
Loading…
Reference in New Issue