X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/3d7c199aafa39e7104b5fbbab43e55e739196afe..19894a1236eae932b4028640f24ab843f691d4e4:/unit-tests/test-cases/bundle-reload/main.c diff --git a/unit-tests/test-cases/bundle-reload/main.c b/unit-tests/test-cases/bundle-reload/main.c index 1f9c3d7..9f0f0c1 100644 --- a/unit-tests/test-cases/bundle-reload/main.c +++ b/unit-tests/test-cases/bundle-reload/main.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "test.h" // PASS(), FAIL() @@ -36,6 +37,8 @@ typedef void (*fooProc)(); // test.bundle void doit() { +// NSCreateObjectFileImageFromMemory is 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"); @@ -66,14 +69,17 @@ void doit() FAIL("NSDestroyObjectFileImage failed"); exit(0); } +#endif } static void myRemoveImage(const struct mach_header *mh, intptr_t vmaddr_slide) { +#if __MAC_OS_X_VERSION_MIN_REQUIRED // calling _dyld_get_image_header_containing_address() during the remove image hook // could cause dyld to not flush the address->image cache _dyld_get_image_header_containing_address(mh); +#endif }