(sending on behalf of the actual author; i've edited the attached
patch so the from line has his details rather than mine.)


The clang FORITFY implementation doesn't like pointer signedness mismatch.
"What mismatch?", you say. "The historical bug in LP32 Android that left
it with a signed socklen_t".

---
 toys/pending/traceroute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
From cf706b28a4d8005564d08e2fbcaa5888d2e7adf3 Mon Sep 17 00:00:00 2001
From: George Burgess IV <[email protected]>
Date: Wed, 24 Feb 2016 21:25:52 -0800
Subject: [PATCH] Use the correct types for recvfrom.

The clang FORITFY implementation doesn't like pointer signedness mismatch.
"What mismatch?", you say. "The historical bug in LP32 Android that left
it with a signed socklen_t".

---
 toys/pending/traceroute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toys/pending/traceroute.c b/toys/pending/traceroute.c
index 4a4f55d..9a818eb 100644
--- a/toys/pending/traceroute.c
+++ b/toys/pending/traceroute.c
@@ -242,7 +242,7 @@ static void do_trace()
           - (t1.tv_sec * USEC + t1.tv_usec);
 
         if (pfd[0].revents) {
-          unsigned addrlen = sizeof(struct sockaddr_storage);
+          socklen_t addrlen = sizeof(struct sockaddr_storage);
           int rcv_len, icmp_res = 0;
 
           rcv_len = recvfrom(TT.recv_sock, toybuf, sizeof(toybuf),
-- 
2.7.0.rc3.207.g0ac5344

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to