From 22eb23706085153368aa8413efbc09976ea2798c Mon Sep 17 00:00:00 2001 From: popcornmix Date: Wed, 14 Sep 2016 21:23:22 +0100 Subject: [PATCH] vchiq: Allow inclusion from C++ --- host_applications/linux/libs/debug_sym/debug_sym.h | 8 ++++++++ interface/vchiq_arm/vchiq_if.h | 8 ++++++++ interface/vchiq_arm/vchiq_util.h | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/host_applications/linux/libs/debug_sym/debug_sym.h b/host_applications/linux/libs/debug_sym/debug_sym.h index 3f3b65f..f05bfa5 100644 --- a/host_applications/linux/libs/debug_sym/debug_sym.h +++ b/host_applications/linux/libs/debug_sym/debug_sym.h @@ -33,6 +33,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "interface/vcos/vcos.h" #include "interface/vcos/vcos_stdint.h" +#ifdef __cplusplus +extern "C" { +#endif + /* ---- Constants and Types ---------------------------------------------- */ typedef struct opaque_vc_mem_access_handle_t *VC_MEM_ACCESS_HANDLE_T; @@ -202,6 +206,10 @@ VC_MEM_SIZE_T GetVideoCoreMemorySize( VC_MEM_ACCESS_HANDLE_T handle ); */ VC_MEM_ADDR_T GetVideoCoreMemoryPhysicalAddress( VC_MEM_ACCESS_HANDLE_T handle ); +#ifdef __cplusplus +} +#endif + #endif /* DEBUG_SYM_H */ diff --git a/interface/vchiq_arm/vchiq_if.h b/interface/vchiq_arm/vchiq_if.h index 40d6cd9..77b7604 100755 --- a/interface/vchiq_arm/vchiq_if.h +++ b/interface/vchiq_arm/vchiq_if.h @@ -30,6 +30,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "interface/vchi/vchi_mh.h" +#ifdef __cplusplus +extern "C" { +#endif + #define VCHIQ_SERVICE_HANDLE_INVALID 0 #define VCHIQ_SLOT_SIZE 4096 @@ -188,4 +192,8 @@ extern VCHIQ_STATUS_T vchiq_dump_phys_mem(VCHIQ_SERVICE_HANDLE_T service, extern VCHIQ_STATUS_T vchiq_get_peer_version(VCHIQ_SERVICE_HANDLE_T handle, short *peer_version); +#ifdef __cplusplus +} +#endif + #endif /* VCHIQ_IF_H */ diff --git a/interface/vchiq_arm/vchiq_util.h b/interface/vchiq_arm/vchiq_util.h index 6c6d556..3628da7 100644 --- a/interface/vchiq_arm/vchiq_util.h +++ b/interface/vchiq_arm/vchiq_util.h @@ -31,6 +31,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "vchiq_if.h" #include "interface/vcos/vcos.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { int size; int read; @@ -53,5 +57,9 @@ extern void vchiu_queue_push(VCHIU_QUEUE_T *queue, VCHIQ_HEADER_T *header); extern VCHIQ_HEADER_T *vchiu_queue_peek(VCHIU_QUEUE_T *queue); extern VCHIQ_HEADER_T *vchiu_queue_pop(VCHIU_QUEUE_T *queue); +#ifdef __cplusplus +} +#endif + #endif