From c4e42566cfecc43f9ef3ddf9c7af57c6744e2ceb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 27 Aug 2013 10:50:06 -0700 Subject: Don't try to use ioctl unless [FIONREAD]. --- resolv/res_send.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'resolv') diff --git a/resolv/res_send.c b/resolv/res_send.c index 140efbe..5a73696 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -1229,8 +1229,11 @@ send_dg(res_state statp, /* Yes, we test ANSCP here. If we have two buffers both will be allocatable. */ && anscp +#ifdef FIONREAD && (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0 - || *thisanssizp < *thisresplenp)) { + || *thisanssizp < *thisresplenp) +#endif + ) { u_char *newp = malloc (MAXPACKET); if (newp != NULL) { *anssizp = MAXPACKET; -- cgit v1.1