wrap older mach code with __MAC_OS_X_VERSION_MIN_REQUIRED

This commit is contained in:
Love Hornquist Astrand
2010-11-25 10:29:32 -08:00
parent 6d7b1fcf7a
commit 88d0a76209

View File

@@ -370,6 +370,7 @@ mach_checkin_or_register(const char *service)
if (kr == KERN_SUCCESS)
return mp;
#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1050
/* Pre SnowLeopard version */
kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &mp);
if (kr != KERN_SUCCESS)
@@ -389,6 +390,9 @@ mach_checkin_or_register(const char *service)
}
return mp;
#else
return MACH_PORT_NULL;
#endif
}