X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/5f1254882f242514d4ceaf1ecebb140dcc2a511d..fc56b708803d28b949a9181528bb0da4d25b3b7b:/stdlib/FreeBSD/system.c diff --git a/stdlib/FreeBSD/system.c b/stdlib/FreeBSD/system.c index 84b2224..8ab1eca 100644 --- a/stdlib/FreeBSD/system.c +++ b/stdlib/FreeBSD/system.c @@ -27,6 +27,9 @@ * SUCH DAMAGE. */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wstrict-prototypes" + #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)system.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ @@ -54,7 +57,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 +88,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) { @@ -150,3 +159,5 @@ __system(command) __weak_reference(__system, system); __weak_reference(__system, _system); + +#pragma clang diagnostic pop