From 95ead0586a79b4f6aba119a482a70a8900b4a857 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 19 Oct 2017 11:32:16 +0200 Subject: [PATCH] Fixed build issues with platform helper --- coreapi/linphonecore.c | 8 ++++++-- coreapi/platform-helpers.h | 14 +++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 555d70537..11ad32dbc 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2269,16 +2269,20 @@ static void linphone_core_init(LinphoneCore * lc, LinphoneCoreCbs *cbs, LpConfig lc->group_chat_rooms = bctbx_mmap_cchar_new(); } +#ifdef __ANDROID__ static void _linphone_core_set_platform_helpers(LinphoneCore *lc, LinphonePrivate::PlatformHelpers *ph){ if (lc->platform_helper) delete getPlatformHelpers(lc); lc->platform_helper = ph; } static void _linphone_core_set_system_context(LinphoneCore *lc, void *system_context){ -#ifdef __ANDROID__ _linphone_core_set_platform_helpers(lc, LinphonePrivate::createAndroidPlatformHelpers(lc, system_context)); -#endif } +#else +static void _linphone_core_set_system_context(LinphoneCore *lc, void *system_context){ + +} +#endif LinphoneCore *_linphone_core_new_with_config(LinphoneCoreCbs *cbs, struct _LpConfig *config, void *userdata, void *system_context) { LinphoneCore *core = belle_sip_object_new(LinphoneCore); diff --git a/coreapi/platform-helpers.h b/coreapi/platform-helpers.h index 8d4b6acf4..b97c0fa2b 100644 --- a/coreapi/platform-helpers.h +++ b/coreapi/platform-helpers.h @@ -47,13 +47,13 @@ class PlatformHelpers{ class StubbedPlatformHelpers : public PlatformHelpers{ public: StubbedPlatformHelpers(LinphoneCore *lc); - virtual void setDnsServers(); - virtual void acquireWifiLock(); - virtual void releaseWifiLock(); - virtual void acquireMcastLock(); - virtual void releaseMcastLock(); - virtual void acquireCpuLock(); - virtual void releaseCpuLock(); + void setDnsServers() override; + void acquireWifiLock() override; + void releaseWifiLock() override; + void acquireMcastLock() override; + void releaseMcastLock() override; + void acquireCpuLock() override; + void releaseCpuLock() override; virtual ~StubbedPlatformHelpers(); };