Fix Haiku build for recent changes to system headers
* src/callproc.c (emacs_posix_spawn_init_actions): Do not use posix_spawn_file_actions_addchdir on Haiku; it links but does not work.
This commit is contained in:
parent
5ad5b797f7
commit
832bd2dfe5
1 changed files with 13 additions and 13 deletions
|
@ -1306,29 +1306,29 @@ emacs_posix_spawn_init_actions (posix_spawn_file_actions_t *actions,
|
|||
return error;
|
||||
|
||||
error = posix_spawn_file_actions_adddup2 (actions, std_in,
|
||||
STDIN_FILENO);
|
||||
STDIN_FILENO);
|
||||
if (error != 0)
|
||||
goto out;
|
||||
|
||||
error = posix_spawn_file_actions_adddup2 (actions, std_out,
|
||||
STDOUT_FILENO);
|
||||
STDOUT_FILENO);
|
||||
if (error != 0)
|
||||
goto out;
|
||||
|
||||
error = posix_spawn_file_actions_adddup2 (actions,
|
||||
std_err < 0 ? std_out
|
||||
: std_err,
|
||||
STDERR_FILENO);
|
||||
std_err < 0 ? std_out
|
||||
: std_err,
|
||||
STDERR_FILENO);
|
||||
if (error != 0)
|
||||
goto out;
|
||||
|
||||
error =
|
||||
#ifdef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
|
||||
posix_spawn_file_actions_addchdir
|
||||
/* Haiku appears to have linkable posix_spawn_file_actions_chdir,
|
||||
but it always fails. So use the _np function instead. */
|
||||
#if defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR && !defined HAIKU
|
||||
error = posix_spawn_file_actions_addchdir (actions, cwd);
|
||||
#else
|
||||
posix_spawn_file_actions_addchdir_np
|
||||
error = posix_spawn_file_actions_addchdir_np (actions, cwd);
|
||||
#endif
|
||||
(actions, cwd);
|
||||
if (error != 0)
|
||||
goto out;
|
||||
|
||||
|
@ -1347,9 +1347,9 @@ emacs_posix_spawn_init_attributes (posix_spawnattr_t *attributes,
|
|||
return error;
|
||||
|
||||
error = posix_spawnattr_setflags (attributes,
|
||||
POSIX_SPAWN_SETSID
|
||||
| POSIX_SPAWN_SETSIGDEF
|
||||
| POSIX_SPAWN_SETSIGMASK);
|
||||
POSIX_SPAWN_SETSID
|
||||
| POSIX_SPAWN_SETSIGDEF
|
||||
| POSIX_SPAWN_SETSIGMASK);
|
||||
if (error != 0)
|
||||
goto out;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue