From ba11a2fc2212d1515016ae5b0e1754554789318b Mon Sep 17 00:00:00 2001 From: Jason Hu Date: Sat, 27 Apr 2013 15:08:02 -0400 Subject: Make libdrm interface can be invoked by C++ function. BZ: 103603 Change-Id: I8b8152b2eb1b997b87c2f3e6f53dac85b1ee75e8 Signed-off-by: Jason Hu Reviewed-on: http://android.intel.com:8080/105224 Reviewed-by: cactus Reviewed-by: Xie, Lin Reviewed-by: Ding, Haitao Tested-by: Ding, Haitao Reviewed-by: buildbot Tested-by: buildbot --- libdrm/xf86drm.h | 8 ++++++++ libdrm/xf86drmMode.h | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h index c1d173c..c322d4a 100644 --- a/libdrm/xf86drm.h +++ b/libdrm/xf86drm.h @@ -34,6 +34,10 @@ #ifndef _XF86DRM_H_ #define _XF86DRM_H_ +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + #include #include #include @@ -667,4 +671,8 @@ extern void drmMsg(const char *format, ...); extern int drmSetMaster(int fd); extern int drmDropMaster(int fd); +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + #endif diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h index 5133656..58e828d 100644 --- a/libdrm/xf86drmMode.h +++ b/libdrm/xf86drmMode.h @@ -32,6 +32,12 @@ * IN THE SOFTWARE. * */ +#ifndef _XF86DRMMODE_H_ +#define _XF86DRMMODE_H_ + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif #include @@ -365,3 +371,9 @@ extern int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size, uint16_t *red, uint16_t *green, uint16_t *blue); extern int drmModeCrtcGetGamma(int fd, uint32_t crtc_id, uint32_t size, uint16_t *red, uint16_t *green, uint16_t *blue); + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif -- cgit v1.2.3