From: Kefu Chai Date: Sun, 21 Mar 2021 15:02:44 +0000 (+0800) Subject: cephsqlite: hide non-public symbols X-Git-Tag: v17.1.0~2473^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=21486ed9531506362465300512617b2838780a1c;p=ceph-ci.git cephsqlite: hide non-public symbols mark public interfaces using `[[gnu::visibility("default")]]`, so we can expose them when the default visibility is "hidden". Signed-off-by: Kefu Chai --- diff --git a/src/SimpleRADOSStriper.h b/src/SimpleRADOSStriper.h index 2e7984870f9..c5d3f5090ee 100644 --- a/src/SimpleRADOSStriper.h +++ b/src/SimpleRADOSStriper.h @@ -27,7 +27,7 @@ #include "common/ceph_time.h" #include "common/perf_counters.h" -class SimpleRADOSStriper +class [[gnu::visibility("default")]] SimpleRADOSStriper { public: using aiocompletionptr = std::unique_ptr; diff --git a/src/include/libcephsqlite.h b/src/include/libcephsqlite.h index 0fd1b5fd560..d81cc55e8a9 100644 --- a/src/include/libcephsqlite.h +++ b/src/include/libcephsqlite.h @@ -27,9 +27,12 @@ #ifdef _WIN32 # define LIBCEPHSQLITE_API __declspec(dllexport) #else -# define LIBCEPHSQLITE_API extern "C" +# define LIBCEPHSQLITE_API [[gnu::visibility("default")]] #endif +#ifdef __cplusplus +extern "C" { +#endif /* This is the SQLite entry point when loaded as a dynamic library. You also * need to ensure SQLite calls this method when using libcephsqlite as a static * library or a dynamic library linked at compile time. For the latter case, @@ -63,5 +66,8 @@ LIBCEPHSQLITE_API int sqlite3_cephsqlite_init(sqlite3* db, char** err, const sql */ LIBCEPHSQLITE_API int cephsqlite_setcct(class CephContext* cct, char** ident); +#ifdef __cplusplus +} +#endif #endif