mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-21 04:14:17 +08:00
bash: Patch for incorrect feature checks in execute-cmd.c
This commit is contained in:
parent
3f60f5686d
commit
8eb4609469
21
recipes/bash/04-execute-cmd.patch
Normal file
21
recipes/bash/04-execute-cmd.patch
Normal file
@ -0,0 +1,21 @@
|
||||
--- source/execute_cmd.c 2016-08-26 05:10:08.000000000 -0600
|
||||
+++ source-new/execute_cmd.c 2018-11-17 07:32:59.626764573 -0700
|
||||
@@ -1335,15 +1335,17 @@
|
||||
nullcmd = (command == 0) || (command->type == cm_simple && command->value.Simple->words == 0 && command->value.Simple->redirects == 0);
|
||||
if (posixly_correct && nullcmd)
|
||||
{
|
||||
-#if defined (HAVE_GETRUSAGE)
|
||||
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY)
|
||||
selfb.ru_utime.tv_sec = kidsb.ru_utime.tv_sec = selfb.ru_stime.tv_sec = kidsb.ru_stime.tv_sec = 0;
|
||||
selfb.ru_utime.tv_usec = kidsb.ru_utime.tv_usec = selfb.ru_stime.tv_usec = kidsb.ru_stime.tv_usec = 0;
|
||||
before.tv_sec = shell_start_time;
|
||||
before.tv_usec = 0;
|
||||
#else
|
||||
+# if defined (HAVE_TIMES)
|
||||
before.tms_utime = before.tms_stime = before.tms_cutime = before.tms_cstime = 0;
|
||||
tbefore = shell_start_time;
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
old_flags = command->flags;
|
||||
Loading…
Reference in New Issue
Block a user