From 98c8caa28a02354c86ea5788c6d7a09e38147f79 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期三, 29 七月 2020 17:56:49 +0800
Subject: [PATCH] add alloc key

---
 libcsoftbus.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/libcsoftbus.c b/libcsoftbus.c
index 1c02eaf..a5a23c1 100644
--- a/libcsoftbus.c
+++ b/libcsoftbus.c
@@ -57,6 +57,14 @@
     fn_shm_init(size);
 }
 
+int wrap_fn_shm_alloc_key(hcsoftbus lib){
+    if (!fn_shm_alloc_key){
+        fn_shm_alloc_key = (tfn_shm_alloc_key)dlsym(lib, l_shm_alloc_key);
+        check_with_ret(fn_shm_alloc_key, lib, -1);
+    }
+    return fn_shm_alloc_key();
+}
+
 void wrap_fn_shm_destroy(hcsoftbus lib){
     if (!fn_shm_destroy){
         printf("shm destroy failed\n");

--
Gitblit v1.8.0