tor: fix building if GCC's C standard is not gnu99
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Thu, 2 Jul 2015 10:14:15 +0000 (13:14 +0300)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 2 Jul 2015 15:36:35 +0000 (17:36 +0200)
commit5cf5b390385fb6325485e37dc9d38e1e3ac1f091
tree4c67d1bb785437386e60cbbdc5a6471afbeb120c
parenta6a2962d998c82f888957fb19bd2933bbf73f92d
tor: fix building if GCC's C standard is not gnu99

Up to date tor (at least starting from 0.2.6) requires compiler with C99
plus some extensions support.

If default GCC's C standard < c99 (that's the case at least for ARC)
you'll see this on attempt to build tor:
----------------------->8--------------------
src/common/address.c: In function ''tor_addr_parse_PTR_name':
src/common/address.c:502:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (int i = 0; i < 16; ++i) {
     ^
src/common/address.c:502:5: note: use option -std=c99 or -std=gnu99 to compile your code
----------------------->8--------------------

Once you follow compiler advice and enable c99 support with "-std=c99"
you'll pass that failure but will see tons of other errors, see
https://www.mail-archive.com/tor-dev@lists.torproject.org/msg06273.html

And only g99 resolves all problems at once.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/tor/tor.mk