tor: fix building if GCC's C standard is not gnu99
PATCH 1/1 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@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 at lists.torproject.org/msg06273.html
And only g99 resolves all problems at once.
--- package/tor/tor.mk | 2 ++ 1 file changed, 2 insertions(+)
package/tor/tor.mk +2 -0
@@ -32,4 +32,6 @@ else TOR_CONF_OPTS += --disable-seccomp endif +TOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' + $(eval $(autotools-package))
Signature · 1 line
2.4.3
PATCH 1/1 tor: fix building if GCC's C standard is not gnu99
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Alexey" == Alexey Brodkin <[email protected]> writes:
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@least for ARC) you'll see this on attempt to build tor:
-----------------------> 8--------------------
Quoted 5 lines
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 modefor (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--------------------
Quoted 9 lines
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 at lists.torproject.org/msg06273.htmlAnd only g99 resolves all problems at once.
Signed-off-by Alexey Brodkin <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Vicente Olivert Riera <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard