return -1;
}
- ret = ub_ctx_resolvconf(ctx, "/etc/resolv.conf");
+ ret = ub_ctx_resolvconf(ctx, NULL);
if (ret != 0) {
if (errmsg)
snprintf(errmsg, errmsg_size,
- "Host name lookup failure: Could not read /etc/resolv.conf "
+ "Host name lookup failure: Could not read resolv.conf "
"(resolver error: %s) (system error: %s)",
ub_strerror(ret), strerror(errno));
ub_ctx_delete(ctx);
return -1;
}
- ret = ub_ctx_hosts(ctx, "/etc/hosts");
+ ret = ub_ctx_hosts(ctx, NULL);
if (ret != 0) {
if (errmsg)
snprintf(errmsg, errmsg_size,
- "Host name lookup failure: Could not read /etc/hosts "
+ "Host name lookup failure: Could not read hosts file "
"(resolver error: %s) (system error: %s)",
ub_strerror(ret), strerror(errno));
ub_ctx_delete(ctx);