mirror of https://github.com/mpv-player/mpv
build: make posix_spawn() mandatory
It was already accidentally used unconditionally by command.c. Apparently this worked well for us, so don't change anything about, but should it be unavailable, fail at configure time instead of compile time.
This commit is contained in:
parent
ebef5da074
commit
39f6f6b104
|
@ -1146,7 +1146,6 @@ static int script_join_path(lua_State *L)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_POSIX_SPAWN || defined(__MINGW32__)
|
|
||||||
struct subprocess_cb_ctx {
|
struct subprocess_cb_ctx {
|
||||||
struct mp_log *log;
|
struct mp_log *log;
|
||||||
void* talloc_ctx;
|
void* talloc_ctx;
|
||||||
|
@ -1223,7 +1222,6 @@ static int script_subprocess(lua_State *L)
|
||||||
lua_setfield(L, -2, "stdout"); // res
|
lua_setfield(L, -2, "stdout"); // res
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static int script_parse_json(lua_State *L)
|
static int script_parse_json(lua_State *L)
|
||||||
{
|
{
|
||||||
|
@ -1295,9 +1293,7 @@ static const struct fn_entry utils_fns[] = {
|
||||||
FN_ENTRY(readdir),
|
FN_ENTRY(readdir),
|
||||||
FN_ENTRY(split_path),
|
FN_ENTRY(split_path),
|
||||||
FN_ENTRY(join_path),
|
FN_ENTRY(join_path),
|
||||||
#if HAVE_POSIX_SPAWN || defined(__MINGW32__)
|
|
||||||
FN_ENTRY(subprocess),
|
FN_ENTRY(subprocess),
|
||||||
#endif
|
|
||||||
FN_ENTRY(parse_json),
|
FN_ENTRY(parse_json),
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
8
wscript
8
wscript
|
@ -213,7 +213,13 @@ iconv support use --disable-iconv.",
|
||||||
'name': 'posix-spawn',
|
'name': 'posix-spawn',
|
||||||
'desc': 'POSIX spawnp()/kill()',
|
'desc': 'POSIX spawnp()/kill()',
|
||||||
'func': check_statement(['spawn.h', 'signal.h'],
|
'func': check_statement(['spawn.h', 'signal.h'],
|
||||||
'posix_spawnp(0,0,0,0,0,0); kill(0,0)')
|
'posix_spawnp(0,0,0,0,0,0); kill(0,0)'),
|
||||||
|
'deps_neg': ['mingw'],
|
||||||
|
}, {
|
||||||
|
'name': 'subprocess',
|
||||||
|
'desc': 'posix_spawnp() or MinGW',
|
||||||
|
'func': check_true,
|
||||||
|
'deps_any': ['posix-spawn', 'mingw'],
|
||||||
}, {
|
}, {
|
||||||
'name': 'glob',
|
'name': 'glob',
|
||||||
'desc': 'glob()',
|
'desc': 'glob()',
|
||||||
|
|
Loading…
Reference in New Issue