diff options
| author | Po Lu | 2022-10-26 14:59:49 +0800 |
|---|---|---|
| committer | Po Lu | 2022-10-26 15:00:35 +0800 |
| commit | 832bd2dfe51b2b9ea5e0e56e0e6ee60b2d8ae2ed (patch) | |
| tree | fb91e057332f98ffc155f5c7b86b94be82c339ff /src/callproc.c | |
| parent | 5ad5b797f78dacb9c901d3c63bee05b1762fa94f (diff) | |
| download | emacs-832bd2dfe51b2b9ea5e0e56e0e6ee60b2d8ae2ed.tar.gz emacs-832bd2dfe51b2b9ea5e0e56e0e6ee60b2d8ae2ed.zip | |
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.
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/callproc.c b/src/callproc.c index 2d457b3c84c..1337d2b9de1 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1306,29 +1306,29 @@ emacs_posix_spawn_init_actions (posix_spawn_file_actions_t *actions, | |||
| 1306 | return error; | 1306 | return error; |
| 1307 | 1307 | ||
| 1308 | error = posix_spawn_file_actions_adddup2 (actions, std_in, | 1308 | error = posix_spawn_file_actions_adddup2 (actions, std_in, |
| 1309 | STDIN_FILENO); | 1309 | STDIN_FILENO); |
| 1310 | if (error != 0) | 1310 | if (error != 0) |
| 1311 | goto out; | 1311 | goto out; |
| 1312 | 1312 | ||
| 1313 | error = posix_spawn_file_actions_adddup2 (actions, std_out, | 1313 | error = posix_spawn_file_actions_adddup2 (actions, std_out, |
| 1314 | STDOUT_FILENO); | 1314 | STDOUT_FILENO); |
| 1315 | if (error != 0) | 1315 | if (error != 0) |
| 1316 | goto out; | 1316 | goto out; |
| 1317 | 1317 | ||
| 1318 | error = posix_spawn_file_actions_adddup2 (actions, | 1318 | error = posix_spawn_file_actions_adddup2 (actions, |
| 1319 | std_err < 0 ? std_out | 1319 | std_err < 0 ? std_out |
| 1320 | : std_err, | 1320 | : std_err, |
| 1321 | STDERR_FILENO); | 1321 | STDERR_FILENO); |
| 1322 | if (error != 0) | 1322 | if (error != 0) |
| 1323 | goto out; | 1323 | goto out; |
| 1324 | 1324 | ||
| 1325 | error = | 1325 | /* Haiku appears to have linkable posix_spawn_file_actions_chdir, |
| 1326 | #ifdef HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR | 1326 | but it always fails. So use the _np function instead. */ |
| 1327 | posix_spawn_file_actions_addchdir | 1327 | #if defined HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR && !defined HAIKU |
| 1328 | error = posix_spawn_file_actions_addchdir (actions, cwd); | ||
| 1328 | #else | 1329 | #else |
| 1329 | posix_spawn_file_actions_addchdir_np | 1330 | error = posix_spawn_file_actions_addchdir_np (actions, cwd); |
| 1330 | #endif | 1331 | #endif |
| 1331 | (actions, cwd); | ||
| 1332 | if (error != 0) | 1332 | if (error != 0) |
| 1333 | goto out; | 1333 | goto out; |
| 1334 | 1334 | ||
| @@ -1347,9 +1347,9 @@ emacs_posix_spawn_init_attributes (posix_spawnattr_t *attributes, | |||
| 1347 | return error; | 1347 | return error; |
| 1348 | 1348 | ||
| 1349 | error = posix_spawnattr_setflags (attributes, | 1349 | error = posix_spawnattr_setflags (attributes, |
| 1350 | POSIX_SPAWN_SETSID | 1350 | POSIX_SPAWN_SETSID |
| 1351 | | POSIX_SPAWN_SETSIGDEF | 1351 | | POSIX_SPAWN_SETSIGDEF |
| 1352 | | POSIX_SPAWN_SETSIGMASK); | 1352 | | POSIX_SPAWN_SETSIGMASK); |
| 1353 | if (error != 0) | 1353 | if (error != 0) |
| 1354 | goto out; | 1354 | goto out; |
| 1355 | 1355 | ||