diff --git a/libs/libc/netdb/lib_gethostbyaddrr.c b/libs/libc/netdb/lib_gethostbyaddrr.c index 062f8b74af2..aeb82516442 100644 --- a/libs/libc/netdb/lib_gethostbyaddrr.c +++ b/libs/libc/netdb/lib_gethostbyaddrr.c @@ -384,7 +384,9 @@ int gethostbyaddr_r(FAR const void *addr, socklen_t len, int type, size_t buflen, FAR struct hostent **result, FAR int *h_errnop) { +#if defined(CONFIG_NET_LOOPBACK) || defined(CONFIG_NETDB_HOSTFILE) struct hostent_s tmp; +#endif int ret; DEBUGASSERT(addr != NULL && host != NULL && buf != NULL);