X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=StdLib%2FBsdSocketLib%2Fres_send.c;h=d9ae46558e2fea2f2600ea26dfd1b276b423ccd8;hb=2d675c1c8c9e43195bf32d5a34a54f962f35afca;hp=82addc974561a98713265026e8eb4a5b627790c3;hpb=d7ce700605e1af0e455e31ec11f19ff21d26b525;p=mirror_edk2.git diff --git a/StdLib/BsdSocketLib/res_send.c b/StdLib/BsdSocketLib/res_send.c index 82addc9745..d9ae46558e 100644 --- a/StdLib/BsdSocketLib/res_send.c +++ b/StdLib/BsdSocketLib/res_send.c @@ -114,7 +114,6 @@ static char rcsid[] = "$Id: res_send.c,v 1.1.1.1 2003/11/19 01:51:39 kyu3 Exp $" #endif #ifdef NOPOLL /* libc_r doesn't wrap poll yet() */ -static int use_poll = 0; #else #include static int use_poll = 1; /* adapt to poll() syscall availability */ @@ -767,7 +766,7 @@ read_len: errno = 0; fromlen = sizeof(struct sockaddr_in); resplen = (int)recvfrom(s, (char*)ans, anssiz, 0, - (struct sockaddr *)&from, &fromlen); + (struct sockaddr *)&from, (socklen_t *)&fromlen); if (resplen <= 0) { Perror(stderr, "recvfrom", errno); res_close(); @@ -855,10 +854,10 @@ read_len: ((_res.pfcode & RES_PRF_REPLY) && (_res.pfcode & RES_PRF_HEAD1)), (stdout, ";; got answer:\n")); - DprintQ((_res.options & RES_DEBUG) || - (_res.pfcode & RES_PRF_REPLY), - (stdout, ""), - ans, (resplen>anssiz)?anssiz:resplen); + if((_res.options & RES_DEBUG) || + (_res.pfcode & RES_PRF_REPLY)) { + __fp_nquery(ans, (resplen>anssiz)?anssiz:resplen, stdout); + } /* * If using virtual circuits, we assume that the first server * is preferred over the rest (i.e. it is on the local