Browse Source

Fix compile issue on Mac OS X

rdb 9 years ago
parent
commit
fede8b8d69
2 changed files with 6 additions and 1 deletions
  1. 5 0
      makepanda/makepandacore.py
  2. 1 1
      panda/src/nativenet/socket_udp_incoming.h

+ 5 - 0
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())

+ 1 - 1
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));
   }