diff --git a/libs/libc/netdb/lib_dnsquery.c b/libs/libc/netdb/lib_dnsquery.c index bcf777dbecd..a42bcb83118 100644 --- a/libs/libc/netdb/lib_dnsquery.c +++ b/libs/libc/netdb/lib_dnsquery.c @@ -301,10 +301,10 @@ static int dns_send_query(int sd, FAR const char *name, return ret; } - ret = _NX_SEND(sd, buffer, dest - buffer, 0); + ret = send(sd, buffer, dest - buffer, 0); if (ret < 0) { - ret = -_NX_GETERRNO(ret); + ret = -errno; nerr("ERROR: sendto failed: %d\n", ret); return ret; } @@ -346,10 +346,10 @@ static int dns_recv_response(int sd, FAR union dns_addr_u *addr, int naddr, /* Receive the response */ - ret = _NX_RECV(sd, buffer, RECV_BUFFER_SIZE, 0); + ret = recv(sd, buffer, RECV_BUFFER_SIZE, 0); if (ret < 0) { - ret = -_NX_GETERRNO(ret); + ret = -errno; nerr("ERROR: recv failed: %d\n", ret); return ret; }