]> git.saurik.com Git - apple/dyld.git/blobdiff - unit-tests/test-cases/bundle-basic/main.c
dyld-353.2.1.tar.gz
[apple/dyld.git] / unit-tests / test-cases / bundle-basic / main.c
index 27f76358e1310d172476d765f16ea9bd86336695..49d30c37dc264bb8424fd5037a67c51281746c70 100644 (file)
@@ -23,6 +23,7 @@
 #include <stdio.h>
 #include <stdbool.h>
 #include <mach-o/dyld.h>
+#include <Availability.h>
 
 #include "test.h" // PASS(), FAIL()
 
@@ -30,6 +31,8 @@ typedef bool (*CheckFunc)();
 
 int main()
 {
+// these APIs are only available on Mac OS X - not iPhone OS
+#if __MAC_OS_X_VERSION_MIN_REQUIRED
        NSObjectFileImage ofi;
        if ( NSCreateObjectFileImageFromFile("test.bundle", &ofi) != NSObjectFileImageSuccess ) {
                FAIL("NSCreateObjectFileImageFromFile failed");
@@ -63,7 +66,7 @@ int main()
                FAIL("NSDestroyObjectFileImage failed");
                return 1;
        }
-
+#endif
        PASS("bundle-basic");
        return 0;
 }
\ No newline at end of file