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

