mirror of git://sourceware.org/git/glibc.git
Don't try to use ioctl unless [FIONREAD].
This commit is contained in:
parent
f890a59b10
commit
c4e42566cf
|
@ -1,5 +1,7 @@
|
||||||
2013-08-27 Roland McGrath <roland@hack.frob.com>
|
2013-08-27 Roland McGrath <roland@hack.frob.com>
|
||||||
|
|
||||||
|
* resolv/res_send.c (send_dg): Don't try to use ioctl unless [FIONREAD].
|
||||||
|
|
||||||
* resolv/res_hconf.c [!NOT_IN_libc] (ifaddrs): Declare
|
* resolv/res_hconf.c [!NOT_IN_libc] (ifaddrs): Declare
|
||||||
only under [SIOCGIFCONF && SIOCGIFNETMASK].
|
only under [SIOCGIFCONF && SIOCGIFNETMASK].
|
||||||
|
|
||||||
|
|
|
@ -1229,8 +1229,11 @@ send_dg(res_state statp,
|
||||||
/* Yes, we test ANSCP here. If we have two buffers
|
/* Yes, we test ANSCP here. If we have two buffers
|
||||||
both will be allocatable. */
|
both will be allocatable. */
|
||||||
&& anscp
|
&& anscp
|
||||||
|
#ifdef FIONREAD
|
||||||
&& (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0
|
&& (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0
|
||||||
|| *thisanssizp < *thisresplenp)) {
|
|| *thisanssizp < *thisresplenp)
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
u_char *newp = malloc (MAXPACKET);
|
u_char *newp = malloc (MAXPACKET);
|
||||||
if (newp != NULL) {
|
if (newp != NULL) {
|
||||||
*anssizp = MAXPACKET;
|
*anssizp = MAXPACKET;
|
||||||
|
|
Loading…
Reference in New Issue