|
@@ -33,10 +33,11 @@
|
|
*/
|
|
*/
|
|
/* copyright --> */
|
|
/* copyright --> */
|
|
#include "AsyncNameResolver.h"
|
|
#include "AsyncNameResolver.h"
|
|
-#include "util.h"
|
|
|
|
-#include "A2STR.h"
|
|
|
|
|
|
+
|
|
#include <cstring>
|
|
#include <cstring>
|
|
|
|
|
|
|
|
+#include "A2STR.h"
|
|
|
|
+
|
|
namespace aria2 {
|
|
namespace aria2 {
|
|
|
|
|
|
#ifdef HAVE_LIBCARES1_5
|
|
#ifdef HAVE_LIBCARES1_5
|
|
@@ -47,11 +48,7 @@ void callback(void* arg, int status, int timeouts, struct hostent* host)
|
|
{
|
|
{
|
|
AsyncNameResolver* resolverPtr = reinterpret_cast<AsyncNameResolver*>(arg);
|
|
AsyncNameResolver* resolverPtr = reinterpret_cast<AsyncNameResolver*>(arg);
|
|
if(status != ARES_SUCCESS) {
|
|
if(status != ARES_SUCCESS) {
|
|
-#ifdef HAVE_LIBCARES
|
|
|
|
resolverPtr->error = ares_strerror(status);
|
|
resolverPtr->error = ares_strerror(status);
|
|
-#else
|
|
|
|
- resolverPtr->error = ares_strerror(status, 0);
|
|
|
|
-#endif // HAVE_LIBCARES
|
|
|
|
resolverPtr->status = AsyncNameResolver::STATUS_ERROR;
|
|
resolverPtr->status = AsyncNameResolver::STATUS_ERROR;
|
|
return;
|
|
return;
|
|
}
|
|
}
|