build: make posix_spawn optional

OK, Android doesn't support it.
This commit is contained in:
wm4 2016-02-08 20:29:08 +01:00
parent 5d0c89a039
commit c3348d86f2
2 changed files with 12 additions and 1 deletions

View File

@ -17,6 +17,8 @@
#include <pthread.h>
#include "config.h"
#include "common/common.h"
#include "common/msg.h"
#include "common/msg_control.h"
@ -55,3 +57,13 @@ void mp_subprocess_detached(struct mp_log *log, char **args)
if (pthread_create(&thread, NULL, run_subprocess, p))
talloc_free(p);
}
#if !HAVE_SUBPROCESS
int mp_subprocess(char **args, struct mp_cancel *cancel, void *ctx,
subprocess_read_cb on_stdout, subprocess_read_cb on_stderr,
char **error)
{
*error = "unsupported";
return -1;
}
#endif

View File

@ -227,7 +227,6 @@ iconv support use --disable-iconv.",
'desc': 'posix_spawnp() or MinGW',
'func': check_true,
'deps_any': ['posix-spawn', 'mingw'],
'req': True,
}, {
'name': 'glob',
'desc': 'glob()',