diff --git a/libc/netdb/lib_gethostbynamer.c b/libc/netdb/lib_gethostbynamer.c index 071444a650f..e7f3aab603d 100644 --- a/libc/netdb/lib_gethostbynamer.c +++ b/libc/netdb/lib_gethostbynamer.c @@ -443,7 +443,9 @@ errorout_with_herrnocode: int gethostbyname_r(FAR const char *name, FAR struct hostent *host, FAR char *buf, size_t buflen, int *h_errnop) { +#ifdef CONFIG_NETDB_DNSCLIENT int ret; +#endif DEBUGASSERT(name != NULL && host != NULL && buf != NULL);