Skip to content
Snippets Groups Projects
Verified Commit 8eb46094 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

bash: Patch for incorrect feature checks in execute-cmd.c

parent 3f60f568
No related branches found
No related tags found
No related merge requests found
--- 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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment