From 7ed03fe8ca71f549d566d4633b6d8f1e9eb7d597 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Thu, 4 Feb 2021 15:18:36 -0800 Subject: compiler_wrapper: make a loop c89-compatible building this on the CQ is failing because this loop uses the c99 feature declaring something in the first clause of a for loop. BUG=None TEST=CQ Change-Id: I92729d30bd392c46e2b1183b92874212bdc59d6f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2676930 Tested-by: George Burgess Reviewed-by: Manoj Gupta --- compiler_wrapper/libc_exec.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler_wrapper') diff --git a/compiler_wrapper/libc_exec.go b/compiler_wrapper/libc_exec.go index 09f8be85..a7a561bc 100644 --- a/compiler_wrapper/libc_exec.go +++ b/compiler_wrapper/libc_exec.go @@ -21,7 +21,8 @@ package main // // crbug.com/1166017: we're (very rarely) getting ERESTARTSYS on some builders. // // Documentation indicates that this is a bug in the kernel. Work around it by // // retrying. 25 is an arbitrary retry number that Should Be Enough For Anyone(TM). -// for (int i = 0; i < 25; i++) { +// int i = 0; +// for (; i < 25; i++) { // execve(pathname, argv, envp); // if (errno != 512) { // break; -- cgit v1.2.3