X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/6465356a983ac139f81d3b7913cdb548477c346c..15de9d6b4ab2de27ae24b13b7b6c4d55fffe4aef:/stdlib/FreeBSD/system.c diff --git a/stdlib/FreeBSD/system.c b/stdlib/FreeBSD/system.c index 3e99468..84b2224 100644 --- a/stdlib/FreeBSD/system.c +++ b/stdlib/FreeBSD/system.c @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD: src/lib/libc/stdlib/system.c,v 1.11 2007/01/09 00:28:10 imp #include #define environ (*_NSGetEnviron()) +#include + #if __DARWIN_UNIX03 #include @@ -60,6 +62,10 @@ int __system(command) const char *command; { +#if TARGET_OS_IPHONE && (TARGET_OS_SIMULATOR || !TARGET_OS_IOS) + // Don't abort() on iOS for now + LIBC_ABORT("system() is not supported on this platform."); +#else pid_t pid, savedpid; int pstat, err; struct sigaction ign, intact, quitact; @@ -139,6 +145,7 @@ __system(command) pthread_mutex_unlock(&__systemfn_mutex); #endif /* __DARWIN_UNIX03 */ return(pstat); +#endif /* TARGET_OS_IPHONE && (TARGET_OS_SIMULATOR || !TARGET_OS_IOS) */ } __weak_reference(__system, system);