From fede8b8d69815213c9d6fd610cbfaecf5c21dfa9 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 22 Jun 2016 22:24:33 +0200 Subject: [PATCH] Fix compile issue on Mac OS X --- makepanda/makepandacore.py | 5 +++++ panda/src/nativenet/socket_udp_incoming.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index ce75f89b59..9321a79060 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -1543,12 +1543,17 @@ def SmartPkgEnable(pkg, pkgconfig = None, libs = None, incs = None, defs = None, location = LocateLibrary(libname, lpath, prefer_static=True) if location is not None: + # If it's a .so or .dylib we may have changed it and copied it to the built/lib dir. + if location.endswith('.so') or location.endswith('.dylib'): + location = os.path.join(GetOutputDir(), "lib", os.path.basename(location)) LibName(target_pkg, location) else: # This is for backward compatibility - in the thirdparty dir, # we kept some libs with "panda" prefix, like libpandatiff. location = LocateLibrary("panda" + libname, lpath, prefer_static=True) if location is not None: + if location.endswith('.so') or location.endswith('.dylib'): + location = os.path.join(GetOutputDir(), "lib", os.path.basename(location)) LibName(target_pkg, location) else: print(GetColor("cyan") + "Couldn't find library lib" + libname + " in thirdparty directory " + pkg.lower() + GetColor()) diff --git a/panda/src/nativenet/socket_udp_incoming.h b/panda/src/nativenet/socket_udp_incoming.h index b04cb6b303..cf8454b9d2 100644 --- a/panda/src/nativenet/socket_udp_incoming.h +++ b/panda/src/nativenet/socket_udp_incoming.h @@ -150,7 +150,7 @@ OpenForInputMCast(const Socket_Address &address) { sizeof(struct in6_addr)); imreq.ipv6mr_interface = 0; // use DEFAULT interface - status = setsockopt(GetSocket(), IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, + status = setsockopt(GetSocket(), IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&imreq, sizeof(imreq)); }