Correctness fixes for NaCl and other platforms. Add missing includes of stdio.h, and prefer |IN6ADDR_ANY_INIT| to |in6addr_any|. Change-Id: Ia6663ecd6f87008cb82979ef65620a55d8c9405b Reviewed-on: https://boringssl-review.googlesource.com/11626 Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/tool/digest.cc b/tool/digest.cc index d3a7222..7b6c88b 100644 --- a/tool/digest.cc +++ b/tool/digest.cc
@@ -21,6 +21,7 @@ #include <errno.h> #include <fcntl.h> #include <limits.h> +#include <stdio.h> #include <sys/stat.h> #include <sys/types.h>
diff --git a/tool/rand.cc b/tool/rand.cc index 3701748..b442e0d 100644 --- a/tool/rand.cc +++ b/tool/rand.cc
@@ -16,6 +16,7 @@ #include <vector> #include <stdint.h> +#include <stdio.h> #include <stdlib.h> #include <openssl/rand.h>
diff --git a/tool/transport_common.cc b/tool/transport_common.cc index 8761fea..745e8df 100644 --- a/tool/transport_common.cc +++ b/tool/transport_common.cc
@@ -154,7 +154,7 @@ memset(&addr, 0, sizeof(addr)); addr.sin6_family = AF_INET6; - addr.sin6_addr = in6addr_any; + addr.sin6_addr = IN6ADDR_ANY_INIT; addr.sin6_port = htons(atoi(port.c_str())); bool ok = false;