From 761ccce0c3c48da744dfa01f62097ebf54d01f52 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Thu, 12 Jan 2012 18:21:10 +0100 Subject: [PATCH] cec: fix linux compilation --- include/cectypes.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/include/cectypes.h b/include/cectypes.h index b8ae24d..46b25e4 100644 --- a/include/cectypes.h +++ b/include/cectypes.h @@ -37,9 +37,16 @@ #include #include +#if defined(_WIN32) || defined(_WIN64) +#define CDECL __cdecl +#else +#define CDECL +#endif + #if !defined(DECLSPEC) #if defined(_WIN32) || defined(_WIN64) #include +#define CDECL __cdecl #if defined DLL_EXPORT #define DECLSPEC __declspec(dllexport) #else @@ -866,9 +873,10 @@ typedef struct cec_logical_addresses #endif } cec_logical_addresses; -typedef int (__cdecl *CBCecLogMessageType)(const CEC::cec_log_message &); -typedef int (__cdecl* CBCecKeyPressType)(const cec_keypress &key); -typedef int (__cdecl* CBCecCommandType)(const cec_command &command); + +typedef int (CDECL* CBCecLogMessageType)(const CEC::cec_log_message &); +typedef int (CDECL* CBCecKeyPressType)(const cec_keypress &key); +typedef int (CDECL* CBCecCommandType)(const cec_command &command); typedef struct ICECCallbacks { -- 2.34.1