diff options
author | Jason Hu <jason.hu@intel.com> | 2013-04-27 15:08:02 -0400 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:05:30 -0700 |
commit | ba11a2fc2212d1515016ae5b0e1754554789318b (patch) | |
tree | e3a54e293e5f15247ddc4a6c6ab920c81bbfe641 | |
parent | 16f46007971e9f823261ec8542519afb82381f88 (diff) | |
download | libdrm-ba11a2fc2212d1515016ae5b0e1754554789318b.tar.gz |
Make libdrm interface can be invoked by C++ function.
BZ: 103603
Change-Id: I8b8152b2eb1b997b87c2f3e6f53dac85b1ee75e8
Signed-off-by: Jason Hu <jason.hu@intel.com>
Reviewed-on: http://android.intel.com:8080/105224
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Xie, Lin <lin.xie@intel.com>
Reviewed-by: Ding, Haitao <haitao.ding@intel.com>
Tested-by: Ding, Haitao <haitao.ding@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
-rw-r--r-- | libdrm/xf86drm.h | 8 | ||||
-rw-r--r-- | libdrm/xf86drmMode.h | 12 |
2 files changed, 20 insertions, 0 deletions
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 <stdarg.h> #include <sys/types.h> #include <stdint.h> @@ -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 <drm.h> @@ -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 |