[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-dev] OpenWrt cross compile build error in 0.2.6.8



On Friday 22 May 2015 09:20:29 Shawn Nock wrote:
> Will you post the Makefile for the buildroot package?

Sorry guys, I sorted this one out.  The culprit was actually my added -stdÉ9 that made lots of other stuff break.  Taking that out it boiled down to a few uses of:

for (int i = 0; ......

Changing those to:

int i;
for (i 
Fixed the build.

I have attached a patch.

--
Lars Boegild Thomsen
https://reclaim-your-privacy.com
Jabber/XMPP: lth@xxxxxxxxxxxxxxxxxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part.

--- a/src/common/address.c
+++ b/src/common/address.c
@@ -499,7 +499,8 @@ tor_addr_parse_PTR_name(tor_addr_t *resu
       return -1;
 
     cp = address;
-    for (int i = 0; i < 16; ++i) {
+    int i;
+    for (i = 0; i < 16; ++i) {
       n0 = hex_decode_digit(*cp++); /* The low-order nybble appears first. */
       if (*cp++ != '.') return -1;  /* Then a dot. */
       n1 = hex_decode_digit(*cp++); /* The high-order nybble appears first. */
--- a/src/test/test_routerlist.c
+++ b/src/test/test_routerlist.c
@@ -30,7 +30,8 @@ test_routerlist_initiate_descriptor_down
   smartlist_t *digests = smartlist_new();
   (void)arg;
 
-  for (int i = 0; i < 20; i++) {
+  int i; 
+  for (i = 0; i < 20; i++) {
     smartlist_add(digests, (char*)prose);
   }
 
@@ -74,7 +75,8 @@ test_routerlist_launch_descriptor_downlo
   char *cp;
   (void)arg;
 
-  for (int i = 0; i < 100; i++) {
+  int i;
+  for (i = 0; i < 100; i++) {
     cp = tor_malloc(DIGEST256_LEN);
     tt_assert(cp);
     crypto_rand(cp, DIGEST256_LEN);
_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev