提交 47b9f532 编写于 作者: L liwentao_uiw

Title: allow to get netsys status when there is no resolv result from default dns

Description: netsys should be enough to determine the network status and default dns is setting by the product instead of libc

Issue: https://gitee.com/openharmony/third_party_musl/issues/I6PCEM?from=project-issue
Test: libc-test pass
Signed-off-by: Nliwentao <liwentao20@huawei.com>

Change-Id: I39bdb98929bbc36b69c2b12f5bf2532be2aa3fe8
上级 36d60957
......@@ -68,6 +68,10 @@ netsys_conf:
}
}
if (nns != 0) {
goto get_conf_ok;
}
etc_resolv_conf:
#endif
f = __fopen_rb_ca("/etc/resolv.conf", &_f, _buf, sizeof _buf);
......@@ -140,6 +144,7 @@ no_resolv_conf:
nns = 1;
}
get_conf_ok:
conf->nns = nns;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册