From 10cc732b6137b53dfbde561d7619a4dc85a1e22e Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:41:43 -0300 Subject: [PATCH] Fix NetworkManager compilation warning --- libraries/Network/src/NetworkManager.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libraries/Network/src/NetworkManager.cpp b/libraries/Network/src/NetworkManager.cpp index 7aeab8901ec..5642ae30967 100644 --- a/libraries/Network/src/NetworkManager.cpp +++ b/libraries/Network/src/NetworkManager.cpp @@ -67,10 +67,11 @@ int NetworkManager::hostByName(const char* aHostname, IPAddress& aResult) const char *servname = "0"; struct addrinfo *res; - const struct addrinfo hints = { - .ai_family = AF_UNSPEC, - .ai_socktype = SOCK_STREAM, - }; + struct addrinfo hints; + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + err = lwip_getaddrinfo(aHostname, servname, &hints, &res); if (err == ERR_OK) {