Subject: ares_init.c:1614: error: 'for' loop initial declaration used outside C99 mode

ares_init.c:1614: error: 'for' loop initial declaration used outside C99 mode

From: Jeffrey Walton <noloader_at_gmail.com>
Date: Sat, 18 Jul 2020 00:07:12 -0400

Hi Everyone,

I'm building c-ares-1.16.1 on an antique PowerMac G5. The machine has
GCC 4.0.1. I'm catching a compile error:

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.
-DCARES_BUILDING_LIBRARY -DCARES_SYMBOL_HIDING -isystem
/usr/local/include -DNDEBUG -fvisibility=hidden -O2 -mlong-double-64
-fPIC -pthread -g0 -Wno-system-headers -MT
libcares_la-ares_library_init.lo -MD -MP -MF
.deps/libcares_la-ares_library_init.Tpo -c ares_library_init.c
-fno-common -DPIC -o .libs/libcares_la-ares_library_init.o
ares_init.c: In function 'init_by_resolv_conf':
ares_init.c:1614: error: 'for' loop initial declaration used outside C99 mode
ares_init.c:1643: error: 'for' loop initial declaration used outside C99 mode
make[2]: *** [libcares_la-ares_init.lo] Error 1

Jeff
Received on 2020-07-18