From 21a8ea1a4ced41b290e133805c6e19dad6f6b21c Mon Sep 17 00:00:00 2001 From: Tobias Markmann <tm@ayena.de> Date: Fri, 22 May 2015 23:02:12 +0200 Subject: Fix compilation on FreeBSD 10 Configuration for LibMiniUPNPc did not detect size of ip_mreqn correctly. Test-Information: Tested on FreeBSD 10. Change-Id: I5d91695b6ec2f1ad91e4fe6bf0e73876fef4fa8b diff --git a/3rdParty/LibMiniUPnPc/SConscript b/3rdParty/LibMiniUPnPc/SConscript index ce2fe48..05eed8f 100644 --- a/3rdParty/LibMiniUPnPc/SConscript +++ b/3rdParty/LibMiniUPnPc/SConscript @@ -35,19 +35,20 @@ if env.get("LIBMINIUPNPC_BUNDLED", False) : myenv.Replace(CCFLAGS = [flag for flag in env["CCFLAGS"] if flag not in ["-W", "-Wall"]]) myenv.Append(CCFLAGS = ["-DNDEBUG", "-DSTATICLIB"]) - + if myenv["PLATFORM"] != "win32": myenv.Append(CCFLAGS = ["-DMINIUPNPC_SET_SOCKET_TIMEOUT"]) - + myenv.Append(CCFLAGS = ["-D_BSD_SOURCE"]) + if myenv["PLATFORM"] == "darwin": myenv.Append(CCFLAGS = ["-DMACOSX", "-D_DARWIN_C_SOURCE"]) - + 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: + if conf.CheckTypeSize("struct ip_mreqn", includes="#include <netinet/in.h>") == 0: myenv.Append(CCFLAGS = ["-DNEED_STRUCT_IP_MREQN"]) conf.Finish() -- cgit v0.10.2-6-g49f6