diff --git a/BUILD.gn b/BUILD.gn index c338e85..46e1779 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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", ] } diff --git a/src/net/lwip-2.1/src/sockets.c b/src/net/lwip-2.1/src/sockets.c index 126758a..2fcb1f7 100644 --- a/src/net/lwip-2.1/src/sockets.c +++ b/src/net/lwip-2.1/src/sockets.c @@ -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); }