diff options
Diffstat (limited to 'implementation/service_discovery/src/runtime.cpp')
-rw-r--r-- | implementation/service_discovery/src/runtime.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/implementation/service_discovery/src/runtime.cpp b/implementation/service_discovery/src/runtime.cpp index be68d24..3d12892 100644 --- a/implementation/service_discovery/src/runtime.cpp +++ b/implementation/service_discovery/src/runtime.cpp @@ -12,7 +12,7 @@ extern "C" __declspec(dllexport) std::shared_ptr<vsomeip::sd::runtime> VSOMEIP_SD_RUNTIME_SYMBOL; } #else -std::shared_ptr<vsomeip::sd::runtime> VSOMEIP_SD_RUNTIME_SYMBOL; +std::shared_ptr<vsomeip::sd::runtime> VSOMEIP_SD_RUNTIME_SYMBOL(vsomeip::sd::runtime::get()); #endif #ifdef WIN32 @@ -22,16 +22,11 @@ std::shared_ptr<vsomeip::sd::runtime> VSOMEIP_SD_RUNTIME_SYMBOL; static void __cdecl f(void); \ __declspec(allocate(".CRT$XCU")) void(__cdecl*f##_)(void) = f; \ static void __cdecl f(void) -#else -#define CCALL -#define INITIALIZER(f) \ - static void f(void) __attribute__((constructor)); \ - static void f(void) -#endif INITIALIZER(init_vsomeip_sd) { VSOMEIP_SD_RUNTIME_SYMBOL = vsomeip::sd::runtime::get(); } +#endif namespace vsomeip { namespace sd { |