darwin: fix ios build, don't require ApplicationServices

This commit is contained in:
Ben Noordhuis 2013-05-13 20:06:25 +02:00
parent a11d16d8f5
commit f22163c233

View File

@ -18,11 +18,18 @@
* IN THE SOFTWARE.
*/
#include <CoreFoundation/CoreFoundation.h>
#include <ApplicationServices/ApplicationServices.h>
#include <TargetConditionals.h>
#if !TARGET_OS_IPHONE
# include <CoreFoundation/CoreFoundation.h>
# include <ApplicationServices/ApplicationServices.h>
#endif
int uv__set_process_title(const char* title) {
#if TARGET_OS_IPHONE
return -1;
#else
typedef CFTypeRef (*LSGetCurrentApplicationASNType)(void);
typedef OSStatus (*LSSetApplicationInformationItemType)(int,
CFTypeRef,
@ -76,4 +83,5 @@ int uv__set_process_title(const char* title) {
NULL);
return (err == noErr) ? 0 : -1;
#endif /* !TARGET_OS_IPHONE */
}