Switch from using sockaddr to sockaddr_storage.
This is to ensure sufficient space is always available.
Change-Id: Ifa87b93ecdc90dcacbfb24446c872344da6703d3
diff --git a/adb_auth_client.cpp b/adb_auth_client.cpp
index 463b496..c4ffc85 100644
--- a/adb_auth_client.cpp
+++ b/adb_auth_client.cpp
@@ -228,13 +228,13 @@
static void adb_auth_listener(int fd, unsigned events, void *data)
{
- struct sockaddr addr;
+ sockaddr_storage addr;
socklen_t alen;
int s;
alen = sizeof(addr);
- s = adb_socket_accept(fd, &addr, &alen);
+ s = adb_socket_accept(fd, reinterpret_cast<sockaddr*>(&addr), &alen);
if (s < 0) {
D("Failed to accept: errno=%d", errno);
return;