1 Star 0 Fork 32

hantwofish/gazelle_1

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0225-POSIX-fix-select-timeout-disable-and-build-failed-in.patch 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
From a1d1d5a6d24748883cfe6bb7018681bc3af00f87 Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
Date: Mon, 22 Jul 2024 15:13:22 +0800
Subject: [PATCH] POSIX: fix select timeout disable and build failed in
openEuler 2003
---
src/lstack/api/lstack_wrap.c | 3 ++-
src/lstack/core/lstack_preload.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lstack/api/lstack_wrap.c b/src/lstack/api/lstack_wrap.c
index 976a3f3..397870e 100644
--- a/src/lstack/api/lstack_wrap.c
+++ b/src/lstack/api/lstack_wrap.c
@@ -636,8 +636,9 @@ static int32_t do_sigaction(int32_t signum, const struct sigaction *act, struct
static int32_t do_select(int32_t nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
{
+ /* while input args are invalid, param timeout will steal be executed in kernel */
if (nfds <= 0 || !(readfds || writefds || exceptfds)) {
- GAZELLE_RETURN(EINVAL);
+ return posix_api->select_fn(nfds, readfds, writefds, exceptfds, timeout);
}
if (select_posix_path() == POSIX_KERNEL) {
diff --git a/src/lstack/core/lstack_preload.c b/src/lstack/core/lstack_preload.c
index 689d2bf..0a1df7d 100644
--- a/src/lstack/core/lstack_preload.c
+++ b/src/lstack/core/lstack_preload.c
@@ -14,6 +14,7 @@
#include <unistd.h>
#include <pthread.h>
#include <securec.h>
+#include <stdbool.h>
#include <lwip/lwipgz_posix_api.h>
#include <lwip/lwipgz_sock.h>
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hantwofish/gazelle_1.git
git@gitee.com:hantwofish/gazelle_1.git
hantwofish
gazelle_1
gazelle_1
master

搜索帮助