X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/bac542e65c0030c0d819c7ff1dcfc25892a61844..484799563310e57a6cac8693ce18f6db71c1b80d:/unit-tests/test-cases/dyld-func-lookup/main.c?ds=inline diff --git a/unit-tests/test-cases/dyld-func-lookup/main.c b/unit-tests/test-cases/dyld-func-lookup/main.c index 270e343..35bbd9f 100644 --- a/unit-tests/test-cases/dyld-func-lookup/main.c +++ b/unit-tests/test-cases/dyld-func-lookup/main.c @@ -24,9 +24,13 @@ #include // exit(), EXIT_SUCCESS #include #include +#include #include "test.h" // PASS(), FAIL(), XPASS(), XFAIL() + +// _dyld_func_lookup is only available in 10.5 and earlier +#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (__MAC_OS_X_VERSION_MIN_REQUIRED <= __MAC_10_5) extern bool check_dyld_func_lookup(); typedef bool (*proc)(void); @@ -53,17 +57,20 @@ static void trySO(const char* path) dlclose(handle); } - +#endif int main() { +// _dyld_func_lookup is only available in 10.5 and earlier +#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (__MAC_OS_X_VERSION_MIN_REQUIRED <= __MAC_10_5) if ( ! check_dyld_func_lookup() ) FAIL("check_dyld_func_lookup failed for main executable"); trySO("test.bundle"); trySO("test.dylib"); - +#endif + PASS("dyld-func-lookup"); return EXIT_SUCCESS; }