diff options
author | Tobias Markmann <tm@ayena.de> | 2015-01-25 19:16:43 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2015-02-09 15:46:21 (GMT) |
commit | 415e2a0e26af19e00b7cafb58be72909ae1d8212 (patch) | |
tree | 945996fd950a3800e17a7897efb45d915b2537fc /3rdParty/LibMiniUPnPc/SConscript | |
parent | 1c64e31945e80e927f87a0a94ec5ce0e00c40a7f (diff) | |
download | swift-415e2a0e26af19e00b7cafb58be72909ae1d8212.zip swift-415e2a0e26af19e00b7cafb58be72909ae1d8212.tar.bz2 |
Update libminiupnpc to version 1.9
Fixes to our build of libminiupnpc:
* do not build minissdpc.c on windows
* if size of ip_mreqn is not defined, add -DNEED_STRUCT_IP_MREQN to the
CFLAGS
Test-Information:
Verified it still builds.
Change-Id: Idd3e19d6302cccc95fff0a01540b9abc1bc91e9e
Diffstat (limited to '3rdParty/LibMiniUPnPc/SConscript')
-rw-r--r-- | 3rdParty/LibMiniUPnPc/SConscript | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/3rdParty/LibMiniUPnPc/SConscript b/3rdParty/LibMiniUPnPc/SConscript index 505060f..7e703f1 100644 --- a/3rdParty/LibMiniUPnPc/SConscript +++ b/3rdParty/LibMiniUPnPc/SConscript @@ -39,23 +39,27 @@ if env.get("LIBMINIUPNPC_BUNDLED", False) : if myenv["PLATFORM"] == "win32": myenv.Append(CCFLAGS = ["-DWIN32", "-D_WIN32_WINNT=0x0501"]) + if myenv["PLATFORM"] != "win32" and myenv["PLATFORM"] != "darwin": + conf = Configure(conf_env) + if conf.CheckTypeSize("ip_mreqn") == 0: + myenv.Append(CCFLAGS = ["-DNEED_STRUCT_IP_MREQN"]) + myenv.WriteVal("src/miniupnpc/miniupnpcstrings.h", myenv.Value( """ #ifndef __MINIUPNPCSTRINGS_H__ #define __MINIUPNPCSTRINGS_H__ #define OS_STRING "$OS_STRING" -#define MINIUPNPC_VERSION_STRING "1.5" +#define MINIUPNPC_VERSION_STRING "1.9" #endif """.replace("$OS_STRING", myenv["PLATFORM"]))) - env["LIBMINIUPNPC_OBJECTS"] = myenv.SwiftenObject([ + miniupnpc_objects = [ "src/miniupnpc/igd_desc_parse.c", "src/miniupnpc/miniupnpc.c", "src/miniupnpc/minixml.c", "src/miniupnpc/minisoap.c", - "src/miniupnpc/minissdpc.c", "src/miniupnpc/miniwget.c", #"src/miniupnpc/upnpc.c", "src/miniupnpc/upnpcommands.c", @@ -64,4 +68,9 @@ if env.get("LIBMINIUPNPC_BUNDLED", False) : "src/miniupnpc/connecthostport.c", "src/miniupnpc/portlistingparse.c", "src/miniupnpc/receivedata.c" - ]) + ] + + if myenv["PLATFORM"] != "win32": + miniupnpc_objects.append("src/miniupnpc/minissdpc.c") + + env["LIBMINIUPNPC_OBJECTS"] = myenv.SwiftenObject(miniupnpc_objects) |