Fix sys/ios-cydia.sh build

This commit is contained in:
pancake 2017-10-10 02:27:34 +02:00
parent d4ab235a74
commit 30d7267bcc
4 changed files with 32 additions and 11 deletions

View File

@ -123,7 +123,19 @@ R_API int r_sandbox_system (const char *x, int n) {
}
#if LIBC_HAVE_FORK
#if LIBC_HAVE_SYSTEM
if (n) return system (x);
if (n) {
#if APPLE_SDK_IPHONEOS
#include <dlfcn.h>
int (*__system)(const char *cmd)
= dlsym (NULL, "system");
if (__system) {
return __system (x);
}
return -1;
#else
return system (x);
#endif
}
return execl ("/bin/sh", "sh", "-c", x, (const char*)NULL);
#else
#include <spawn.h>

View File

@ -1,21 +1,32 @@
#if !TARGET_OS_IPHONE
#ifdef HAVE_FORK
#define HAVE_FORK 1
#endif
#if HAVE_FORK
# if TARGET_OS_IPHONE || APPLE_SDK_IPHONEOS
# define HAVE_SYSTEM 0
# else
# define HAVE_SYSTEM 1
# endif
#else
# define HAVE_SYSTEM 0
#endif
#if HAVE_SYSTEM
#include "p/sh.h"
#endif
#include "p/spp.h"
#include "p/acr.h"
#include "p/pod.h"
#include "p/cpp.h"
#ifdef HAVE_FORK
#define HAVE_FORK 1
#endif
struct Proc *procs[] = {
&spp_proc,
&cpp_proc,
&pod_proc,
&acr_proc,
#if !TARGET_OS_IPHONE
#if HAVE_SYSTEM
&sh_proc,
#endif
NULL

View File

@ -125,7 +125,7 @@ static TAG_CALLBACK(spp_sub) {
// XXX This method needs some love
static TAG_CALLBACK(spp_trace) {
#if HAVE_FORK
#if HAVE_SYSTEM
char b[1024];
if (state->echo[state->ifl]) {
snprintf (b, 1023, "echo '%s' >&2 ", buf);

View File

@ -69,11 +69,9 @@ else
RV=0
fi
if [ $RV = 0 ]; then
time make -j2
time make -j4
if [ $? = 0 ]; then
makeDeb
fi
fi
fi