1195972f6Sopenharmony_ciFrom 4970d00fecf52a472a28d55243f87142d3d08268 Mon Sep 17 00:00:00 2001 2195972f6Sopenharmony_ciFrom: jiangheng <jiangheng12@huawei.com> 3195972f6Sopenharmony_ciDate: Tue, 4 Jan 2022 17:23:03 +0800 4195972f6Sopenharmony_ciSubject: [PATCH] fix some compile errors 5195972f6Sopenharmony_ci 6195972f6Sopenharmony_ci--- 7195972f6Sopenharmony_ci src/include/arch/cc.h | 4 ++-- 8195972f6Sopenharmony_ci src/include/lwiplog.h | 2 +- 9195972f6Sopenharmony_ci src/include/posix_api.h | 2 +- 10195972f6Sopenharmony_ci 3 files changed, 4 insertions(+), 4 deletions(-) 11195972f6Sopenharmony_ci 12195972f6Sopenharmony_cidiff --git a/src/include/arch/cc.h b/src/include/arch/cc.h 13195972f6Sopenharmony_ciindex 33c24b4..222b0c9 100644 14195972f6Sopenharmony_ci--- a/src/include/arch/cc.h 15195972f6Sopenharmony_ci+++ b/src/include/arch/cc.h 16195972f6Sopenharmony_ci@@ -62,7 +62,7 @@ void alloc_memp_##name##_base(void) \ 17195972f6Sopenharmony_ci memp_pools[MEMP_##name] = &memp_ ## name; \ 18195972f6Sopenharmony_ci \ 19195972f6Sopenharmony_ci char mpname[MEMZONE_NAMESIZE] = {0}; \ 20195972f6Sopenharmony_ci- snprintf(mpname, MEMZONE_NAMESIZE, "%ld_%s", gettid(), #name); \ 21195972f6Sopenharmony_ci+ snprintf(mpname, MEMZONE_NAMESIZE, "%d_%s", gettid(), #name); \ 22195972f6Sopenharmony_ci memp_memory_##name##_base = \ 23195972f6Sopenharmony_ci sys_hugepage_malloc(mpname, LWIP_MEM_ALIGN_BUFFER(__size)); \ 24195972f6Sopenharmony_ci memp_pools[MEMP_##name]->base = memp_memory_##name##_base; \ 25195972f6Sopenharmony_ci@@ -73,7 +73,7 @@ PER_THREAD uint8_t *variable_name; \ 26195972f6Sopenharmony_ci void alloc_memory_##variable_name(void) \ 27195972f6Sopenharmony_ci { \ 28195972f6Sopenharmony_ci char mpname[MEMZONE_NAMESIZE] = {0}; \ 29195972f6Sopenharmony_ci- snprintf(mpname, MEMZONE_NAMESIZE, "%ld_%s", gettid(), #variable_name); \ 30195972f6Sopenharmony_ci+ snprintf(mpname, MEMZONE_NAMESIZE, "%d_%s", gettid(), #variable_name); \ 31195972f6Sopenharmony_ci (variable_name) = \ 32195972f6Sopenharmony_ci sys_hugepage_malloc(mpname, LWIP_MEM_ALIGN_BUFFER(size)); \ 33195972f6Sopenharmony_ci } 34195972f6Sopenharmony_cidiff --git a/src/include/lwiplog.h b/src/include/lwiplog.h 35195972f6Sopenharmony_ciindex 363e516..6fccac8 100644 36195972f6Sopenharmony_ci--- a/src/include/lwiplog.h 37195972f6Sopenharmony_ci+++ b/src/include/lwiplog.h 38195972f6Sopenharmony_ci@@ -40,7 +40,7 @@ 39195972f6Sopenharmony_ci 40195972f6Sopenharmony_ci #include "lwipopts.h" 41195972f6Sopenharmony_ci 42195972f6Sopenharmony_ci-#define gettid() syscall(__NR_gettid) 43195972f6Sopenharmony_ci+extern int gettid(void); 44195972f6Sopenharmony_ci 45195972f6Sopenharmony_ci #if USE_DPDK_LOG 46195972f6Sopenharmony_ci 47195972f6Sopenharmony_cidiff --git a/src/include/posix_api.h b/src/include/posix_api.h 48195972f6Sopenharmony_ciindex 8aa8516..0dca8eb 100644 49195972f6Sopenharmony_ci--- a/src/include/posix_api.h 50195972f6Sopenharmony_ci+++ b/src/include/posix_api.h 51195972f6Sopenharmony_ci@@ -79,7 +79,7 @@ typedef struct { 52195972f6Sopenharmony_ci int is_chld; 53195972f6Sopenharmony_ci } posix_api_t; 54195972f6Sopenharmony_ci 55195972f6Sopenharmony_ci-posix_api_t *posix_api; 56195972f6Sopenharmony_ci+extern posix_api_t *posix_api; 57195972f6Sopenharmony_ci 58195972f6Sopenharmony_ci int posix_api_init(void); 59195972f6Sopenharmony_ci void posix_api_free(void); 60195972f6Sopenharmony_ci-- 61195972f6Sopenharmony_ci1.8.3.1 62195972f6Sopenharmony_ci 63