fix: 1.修复listen函数返回值问题

2.修改kernel/uniproton顶层BUILD.gn中编译选项
Close:#I5UQJ3

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
Change-Id: Id6b546f4c9b55d330f19d042c3e3a95612019876
This commit is contained in:
zhangdengyu
2022-10-09 21:01:36 +08:00
parent d8b51df881
commit 71d64ba594
2 changed files with 9 additions and 5 deletions
+5 -5
View File
@@ -10,10 +10,10 @@
# See the Mulan PSL v2 for more details.
# Create: 2022-09-21
# Description: UniProton内核编译脚本。
import("//build/ohos.gni")
import("//build/lite/config/component/lite_component.gni")
import("//third_party/lwip/lwip.gni")
import("//build/ohos.gni")
import("//third_party/littlefs/littlefs.gni")
import("//third_party/lwip/lwip.gni")
import("uniproton.gni")
declare_args() {
@@ -33,7 +33,7 @@ config("arch_config") {
config("kconfig_config") {
cflags = [
"-imacros",
"$MENUCONFIG_H"
"$MENUCONFIG_H",
]
asmflags = cflags
cflags_cc = cflags
@@ -158,7 +158,7 @@ config("os_config") {
":ssp_config",
#":warn_config",
":strong_waring_flag",
#":strong_waring_flag",
":misc_config",
]
@@ -221,7 +221,7 @@ static_library("libkernel") {
group("kernel") {
deps = [
":libkernel",
":notice"
":notice",
]
}
+4
View File
@@ -93,6 +93,10 @@ int connect(int s, const struct sockaddr *name, socklen_t namelen)
int listen(int s, int backlog)
{
if (backlog < 0) {
set_errno(EINVAL);
return -1;
}
return lwip_listen(s, backlog);
}