diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2015-06-25 22:47:35 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2015-06-25 22:56:12 -0700 |
commit | a830525c19d764ecf22b8e4dde996928268bf6e9 (patch) | |
tree | a2b984a3eda4151a35d52bf3dfc7e6205a8b5657 /gssc.mm | |
parent | 71b6516daec193c1eb13aa0030ff866301b17e0d (diff) |
Port build to cycc (from Telesphoreo/iPhone-API).
Diffstat (limited to 'gssc.mm')
-rw-r--r-- | gssc.mm | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -37,7 +37,6 @@ */ /* }}} */ -#import <GraphicsServices/GraphicsServices.h> #import <UIKit/UIKit.h> #include <stdio.h> #include <dlfcn.h> @@ -80,7 +79,7 @@ int main(int argc, char *argv[]) { &OnGSCapabilityChanged, CFSTR("GSCapabilitiesChanged"), NULL, - NULL + 0 ); for (;;) { @@ -93,6 +92,8 @@ int main(int argc, char *argv[]) { } else if ($GSSystemGetCapability != NULL) { capability = reinterpret_cast<const NSDictionary *>((*$GSSystemGetCapability)(reinterpret_cast<CFStringRef>(name))); } else { + capability = nil; + if (void *libMobileGestalt = dlopen("/usr/lib/libMobileGestalt.dylib", RTLD_GLOBAL | RTLD_LAZY)) if (CFTypeRef (*$MGCopyAnswer)(CFStringRef) = reinterpret_cast<CFTypeRef (*)(CFStringRef)>(dlsym(libMobileGestalt, "MGCopyAnswer"))) { NSMutableDictionary *answers([NSMutableDictionary dictionary]); |