From 78ce2cad54061ce26d7eb4f4dfca2b856a3c8052 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Fri, 20 Nov 2015 11:21:53 +0100 Subject: [PATCH] fix compilation issue on gcc <4.6 --- coreapi/linphonecore.h | 2 ++ coreapi/vtables.c | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 2e03ca47a..73a548388 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -48,6 +48,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define LINPHONE_DEPRECATED __attribute__ ((deprecated)) #endif #endif + + #ifdef __cplusplus extern "C" { #endif diff --git a/coreapi/vtables.c b/coreapi/vtables.c index f97594a78..b01a91f08 100644 --- a/coreapi/vtables.c +++ b/coreapi/vtables.c @@ -85,7 +85,9 @@ void linphone_core_notify_registration_state_changed(LinphoneCore *lc, LinphoneP NOTIFY_IF_EXIST(registration_state_changed, lc,cfg,cstate,message); cleanup_dead_vtable_refs(lc); } +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) #pragma GCC diagnostic push +#endif #pragma GCC diagnostic ignored "-Wdeprecated-declarations" void linphone_core_notify_show_interface(LinphoneCore *lc){ NOTIFY_IF_EXIST(show, lc); @@ -111,8 +113,9 @@ void linphone_core_notify_display_url(LinphoneCore *lc, const char *message, con NOTIFY_IF_EXIST(display_url, lc,message,url); cleanup_dead_vtable_refs(lc); } +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) #pragma GCC diagnostic pop - +#endif void linphone_core_notify_notify_presence_received(LinphoneCore *lc, LinphoneFriend * lf){ NOTIFY_IF_EXIST(notify_presence_received, lc,lf); cleanup_dead_vtable_refs(lc); @@ -132,20 +135,26 @@ void linphone_core_notify_call_log_updated(LinphoneCore *lc, LinphoneCallLog *ne NOTIFY_IF_EXIST(call_log_updated, lc,newcl); cleanup_dead_vtable_refs(lc); } +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) #pragma GCC diagnostic push +#endif #pragma GCC diagnostic ignored "-Wdeprecated-declarations" void linphone_core_notify_text_message_received(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message){ NOTIFY_IF_EXIST(text_received, lc,room,from,message); cleanup_dead_vtable_refs(lc); } +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) #pragma GCC diagnostic pop +#endif void linphone_core_notify_message_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message){ NOTIFY_IF_EXIST(message_received, lc,room,message); cleanup_dead_vtable_refs(lc); } +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) #pragma GCC diagnostic push +#endif #pragma GCC diagnostic ignored "-Wdeprecated-declarations" void linphone_core_notify_file_transfer_recv(LinphoneCore *lc, LinphoneChatMessage *message, const LinphoneContent* content, const char* buff, size_t size) { NOTIFY_IF_EXIST(file_transfer_recv, lc,message,content,buff,size); @@ -161,7 +170,9 @@ void linphone_core_notify_file_transfer_progress_indication(LinphoneCore *lc, Li NOTIFY_IF_EXIST(file_transfer_progress_indication, lc,message,content,offset,total); cleanup_dead_vtable_refs(lc); } +#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) #pragma GCC diagnostic pop +#endif void linphone_core_notify_is_composing_received(LinphoneCore *lc, LinphoneChatRoom *room) { NOTIFY_IF_EXIST(is_composing_received, lc,room); cleanup_dead_vtable_refs(lc);