加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0006-add-lstack_preload.c-to-makefile.patch 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
From 28cf0ab6a58444ee9e1fa36ce6d5b6aa6f37f5ad Mon Sep 17 00:00:00 2001
From: yanan-rock <yanan@huawei.com>
Date: Sun, 14 May 2023 21:47:21 -0400
Subject: [PATCH] add lstack_preload.c to makefile fix compile failure
Signed-off-by: yanan-rock <yanan@huawei.com>
---
src/lstack/core/dir.mk | 2 +-
src/lstack/core/lstack_preload.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/lstack/core/dir.mk b/src/lstack/core/dir.mk
index 88c1e08..e2d10a5 100644
--- a/src/lstack/core/dir.mk
+++ b/src/lstack/core/dir.mk
@@ -8,6 +8,6 @@
# PURPOSE.
# See the Mulan PSL v2 for more details.
-SRC = lstack_init.c lstack_cfg.c lstack_dpdk.c lstack_control_plane.c lstack_stack_stat.c lstack_lwip.c lstack_protocol_stack.c lstack_thread_rpc.c
+SRC = lstack_preload.c lstack_init.c lstack_cfg.c lstack_dpdk.c lstack_control_plane.c lstack_stack_stat.c lstack_lwip.c lstack_protocol_stack.c lstack_thread_rpc.c
$(eval $(call register_dir, core, $(SRC)))
diff --git a/src/lstack/core/lstack_preload.c b/src/lstack/core/lstack_preload.c
index e04f49b..e3a98fc 100644
--- a/src/lstack/core/lstack_preload.c
+++ b/src/lstack/core/lstack_preload.c
@@ -13,6 +13,9 @@
#include <stdlib.h>
#include <unistd.h>
+#include "securec.h"
+
+#include "lstack_log.h"
#include "lstack_preload.h"
#define LSTACK_PRELOAD_ENV_SYS "LD_PRELOAD"
@@ -49,7 +52,7 @@ static int32_t preload_check_bind_proc(void)
return -1;
}
-static int32_t preload_info_init(void)
+int preload_info_init(void)
{
char *enval = NULL;
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化