summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xf86drm.h8
-rw-r--r--xf86drmMode.h8
2 files changed, 16 insertions, 0 deletions
diff --git a/xf86drm.h b/xf86drm.h
index 20f4c783e..76eb94e2b 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -39,6 +39,10 @@
#include <stdint.h>
#include <drm.h>
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
#ifndef DRM_MAX_MINOR
#define DRM_MAX_MINOR 16
#endif
@@ -723,4 +727,8 @@ extern int drmHandleEvent(int fd, drmEventContextPtr evctx);
extern char *drmGetDeviceNameFromFd(int fd);
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif
+
#endif
diff --git a/xf86drmMode.h b/xf86drmMode.h
index ee7c45444..1b1e3e21b 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -33,6 +33,10 @@
*
*/
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
#include <drm.h>
/*
@@ -386,3 +390,7 @@ extern int drmModeCrtcGetGamma(int fd, uint32_t crtc_id, uint32_t size,
uint16_t *red, uint16_t *green, uint16_t *blue);
extern int drmModePageFlip(int fd, uint32_t crtc_id, uint32_t fb_id,
uint32_t flags, void *user_data);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif