]> git.saurik.com Git - uikittools.git/blobdiff - gssc.mm
Port to Xcode 4.6.3: newer versions of Xcode fail.
[uikittools.git] / gssc.mm
diff --git a/gssc.mm b/gssc.mm
index 0e1f92f7ca942bb3e6e689a1907f87dc889e9465..7473aaeac0fb2fa50defffed41ec766c575edc4a 100644 (file)
--- a/gssc.mm
+++ b/gssc.mm
@@ -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]);