X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/5f1254882f242514d4ceaf1ecebb140dcc2a511d..e07eda1a0324f771bb1ed20ef94f3229005ee46c:/stdlib/FreeBSD/system.c diff --git a/stdlib/FreeBSD/system.c b/stdlib/FreeBSD/system.c index 84b2224..b4e96ef 100644 --- a/stdlib/FreeBSD/system.c +++ b/stdlib/FreeBSD/system.c @@ -54,7 +54,9 @@ __FBSDID("$FreeBSD: src/lib/libc/stdlib/system.c,v 1.11 2007/01/09 00:28:10 imp #if __DARWIN_UNIX03 #include +#if !(TARGET_OS_IPHONE && (TARGET_OS_SIMULATOR || !TARGET_OS_IOS)) static pthread_mutex_t __systemfn_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif extern int __unix_conforming; #endif /* __DARWIN_UNIX03 */ @@ -83,10 +85,14 @@ __system(command) #endif /* __DARWIN_UNIX03 */ if (!command) { /* just checking... */ +#if TARGET_OS_IPHONE + return(0); +#else if (access(_PATH_BSHELL, F_OK) == -1) /* if no sh or no access */ return(0); else return(1); +#endif } if ((err = posix_spawnattr_init(&attr)) != 0) {