From b147b438d8d04cf85ddffcd3814ee50908623b82 Mon Sep 17 00:00:00 2001 From: Littlefisher619 Date: Sun, 22 Oct 2023 19:28:06 +0000 Subject: [PATCH] fix extern c --- runtime/src/bpftime_shm_json.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/src/bpftime_shm_json.cpp b/runtime/src/bpftime_shm_json.cpp index d52ba5b7..a49268a2 100644 --- a/runtime/src/bpftime_shm_json.cpp +++ b/runtime/src/bpftime_shm_json.cpp @@ -133,6 +133,11 @@ int bpftime::bpftime_import_shm_handler_from_json(bpftime_shm &shm, int fd, return import_shm_handler_from_json(shm, fd, j); } +extern "C" int bpftime_import_shm_handler_from_json(int fd, const char *json_string) { + return bpftime::bpftime_import_shm_handler_from_json( + shm_holder.global_shared_memory, fd, json_string); +} + int bpftime::bpftime_import_shm_from_json(bpftime_shm &shm, const char *filename) {