1515#include <dlfcn.h>
1616#endif
1717
18- #if !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS
18+ #if !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS && ! DEPLOYMENT_TARGET_ANDROID
1919
2020 #if DEPLOYMENT_TARGET_LINUX
2121 #if __LP64__
4848 _kCFBundleFHSDirectory_lib
4949#endif // DEPLOYMENT_TARGET_LINUX
5050
51- #endif // !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS
51+ #endif // !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS && !DEPLOYMENT_TARGET_ANDROID
5252
5353// This is here because on iPhoneOS with the dyld shared cache, we remove binaries from their
5454// original locations on disk, so checking whether a binary's path exists is no longer sufficient.
@@ -73,7 +73,7 @@ static CFURLRef _CFBundleCopyExecutableURLRaw(CFURLRef urlPath, CFStringRef exeN
7373 CFURLRef executableURL = NULL ;
7474 if (!urlPath || !exeName ) return NULL ;
7575
76- #if !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS
76+ #if !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS && ! DEPLOYMENT_TARGET_ANDROID
7777 if (!executableURL ) {
7878 executableURL = CFURLCreateWithFileSystemPathRelativeToBase (kCFAllocatorSystemDefault , exeName , kCFURLPOSIXPathStyle , false, urlPath );
7979 if (!_binaryLoadable (executableURL )) {
@@ -203,7 +203,7 @@ static CFURLRef _CFBundleCopyExecutableURLInDirectory2(CFBundleRef bundle, CFURL
203203 Boolean doExecSearch = true;
204204#endif
205205
206- #if !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS
206+ #if !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS && ! DEPLOYMENT_TARGET_ANDROID
207207 if (lookupMainExe && bundle && bundle -> _isFHSInstalledBundle ) {
208208 // For a FHS installed bundle, the URL points to share/Bundle.resources, and the binary is in:
209209
@@ -227,13 +227,13 @@ static CFURLRef _CFBundleCopyExecutableURLInDirectory2(CFBundleRef bundle, CFURL
227227
228228 CFRelease (prefixPath );
229229 }
230- #endif // !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS
230+ #endif // !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS && !DEPLOYMENT_TARGET_ANDROID
231231
232232 // Now, look for the executable inside the bundle.
233233 if (!foundIt && doExecSearch && 0 != version ) {
234234 CFURLRef exeDirURL = NULL ;
235235
236- #if !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS
236+ #if !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS && ! DEPLOYMENT_TARGET_ANDROID
237237 if (bundle && bundle -> _isFHSInstalledBundle ) {
238238 CFURLRef withoutExtension = CFURLCreateCopyDeletingPathExtension (kCFAllocatorSystemDefault , url );
239239 CFStringRef lastPathComponent = CFURLCopyLastPathComponent (withoutExtension );
@@ -248,7 +248,7 @@ static CFURLRef _CFBundleCopyExecutableURLInDirectory2(CFBundleRef bundle, CFURL
248248 CFRelease (libexec );
249249 CFRelease (exeDirName );
250250 } else
251- #endif // !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS
251+ #endif // !DEPLOYMENT_RUNTIME_OBJC && !DEPLOYMENT_TARGET_WINDOWS && !DEPLOYMENT_TARGET_ANDROID
252252 if (1 == version ) {
253253 exeDirURL = CFURLCreateWithString (kCFAllocatorSystemDefault , _CFBundleExecutablesURLFromBase1 , url );
254254 } else if (2 == version ) {
0 commit comments