summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Kabir Oberai2022-09-04 16:03:37 -0400
committerGravatar Kabir Oberai2022-09-04 16:03:37 -0400
commitb5ce44449216195d02df386a1799efdaffe45a67 (patch)
treeae5a7628e0cc4643e83612bb4076db95cf4b8c21 /src
parent377dda29ea0b5d28ff59c23be2a2a380fd6630ba (diff)
downloadlibimobiledevice-b5ce44449216195d02df386a1799efdaffe45a67.tar.gz
libimobiledevice-b5ce44449216195d02df386a1799efdaffe45a67.tar.bz2
Fix iOS SDK build
Diffstat (limited to 'src')
-rw-r--r--src/lockdown-cu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lockdown-cu.c b/src/lockdown-cu.c
index cdaf02c..61a1c03 100644
--- a/src/lockdown-cu.c
+++ b/src/lockdown-cu.c
@@ -62,6 +62,7 @@
#include <sys/sysctl.h>
#include <SystemConfiguration/SystemConfiguration.h>
#include <CoreFoundation/CoreFoundation.h>
+#include <TargetConditionals.h>
#endif
#include "property_list_service.h"
@@ -647,7 +648,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_cu_pairing_create(lockdownd_cli
/* HOST INFORMATION */
char hostname[256];
-#ifdef __APPLE__
+#if defined(__APPLE__) && !defined(TARGET_OS_IPHONE)
CFStringRef cname = SCDynamicStoreCopyComputerName(NULL, NULL);
CFStringGetCString(cname, hostname, sizeof(hostname), kCFStringEncodingUTF8);
CFRelease(cname);