From 01ee6e21f2ec552425768022c7ab7623fabaf2a2 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 30 Dec 2015 11:58:09 +0100 Subject: [PATCH] Fix build with Visual Studio 2015. --- coreapi/presence.c | 4 ++-- coreapi/private.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/coreapi/presence.c b/coreapi/presence.c index a22ef5984..cec2b1547 100644 --- a/coreapi/presence.c +++ b/coreapi/presence.c @@ -157,7 +157,7 @@ static void presence_activity_delete(LinphonePresenceActivity *activity) { static time_t parse_timestamp(const char *timestamp) { struct tm ret; time_t seconds; -#ifdef LINPHONE_WINDOWS_UNIVERSAL +#if defined(LINPHONE_WINDOWS_UNIVERSAL) || defined(LINPHONE_MSC_VER_GREATER_19) long adjust_timezone; #else time_t adjust_timezone; @@ -174,7 +174,7 @@ static time_t parse_timestamp(const char *timestamp) { ms_error("mktime() failed: %s", strerror(errno)); return (time_t)-1; } -#ifdef LINPHONE_WINDOWS_UNIVERSAL +#if defined(LINPHONE_WINDOWS_UNIVERSAL) || defined(LINPHONE_MSC_VER_GREATER_19) _get_timezone(&adjust_timezone); #else adjust_timezone = timezone; diff --git a/coreapi/private.h b/coreapi/private.h index da79a101b..dee0a31e4 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -111,6 +111,11 @@ extern "C" { #endif #endif #endif +#ifdef _MSC_VER +#if (_MSC_VER >= 1900) +#define LINPHONE_MSC_VER_GREATER_19 +#endif +#endif struct _LinphoneCallParams{ belle_sip_object_t base;