From 5e6c5c2895547d4bce6a9893af24717400a58ad1 Mon Sep 17 00:00:00 2001 From: lianhuix Date: Mon, 17 Jan 2022 16:57:04 +0800 Subject: [PATCH] Fix routines issue Signed-off-by: lianhuix --- .../libs/distributeddb/BUILD.gn | 1 + .../relational/relational_store_sqlite_ext.h | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/services/distributeddataservice/libs/distributeddb/BUILD.gn b/services/distributeddataservice/libs/distributeddb/BUILD.gn index bd6a28f26..2ccb01575 100755 --- a/services/distributeddataservice/libs/distributeddb/BUILD.gn +++ b/services/distributeddataservice/libs/distributeddb/BUILD.gn @@ -45,6 +45,7 @@ config("distrdb_config") { "JSONCPP_USE_BUILDER", "OMIT_FLATBUFFER", "RELATIONAL_STORE", + "SQLITE_DISTRIBUTE_RELATIONAL", ] } diff --git a/services/distributeddataservice/libs/distributeddb/interfaces/include/relational/relational_store_sqlite_ext.h b/services/distributeddataservice/libs/distributeddb/interfaces/include/relational/relational_store_sqlite_ext.h index 5f548ae81..98f6797a4 100644 --- a/services/distributeddataservice/libs/distributeddb/interfaces/include/relational/relational_store_sqlite_ext.h +++ b/services/distributeddataservice/libs/distributeddb/interfaces/include/relational/relational_store_sqlite_ext.h @@ -31,10 +31,29 @@ struct sqlite3_api_routines_relational { }; extern const struct sqlite3_api_routines_relational *sqlite3_export_relational_symbols; +#ifdef sqlite3_close +#undef sqlite3_close +#endif #define sqlite3_close sqlite3_export_relational_symbols->close + +#ifdef sqlite3_close_v2 +#undef sqlite3_close_v2 +#endif #define sqlite3_close_v2 sqlite3_export_relational_symbols->close_v2 + +#ifdef sqlite3_open +#undef sqlite3_open +#endif #define sqlite3_open sqlite3_export_relational_symbols->open + +#ifdef sqlite3_open16 +#undef sqlite3_open16 +#endif #define sqlite3_open16 sqlite3_export_relational_symbols->open16 + +#ifdef sqlite3_open_v2 +#undef sqlite3_open_v2 +#endif #define sqlite3_open_v2 sqlite3_export_relational_symbols->open_v2 #endif -- Gitee