Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: add extern C guard for the UAPI headers

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

+40
+16
include/uapi/drm/drm.h
··· 65 65 66 66 #endif 67 67 68 + #if defined(__cplusplus) 69 + extern "C" { 70 + #endif 71 + 68 72 #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ 69 73 #define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ 70 74 #define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ ··· 695 691 __s32 fd; 696 692 }; 697 693 694 + #if defined(__cplusplus) 695 + } 696 + #endif 697 + 698 698 #include "drm_mode.h" 699 + 700 + #if defined(__cplusplus) 701 + extern "C" { 702 + #endif 699 703 700 704 #define DRM_IOCTL_BASE 'd' 701 705 #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) ··· 896 884 typedef struct drm_agp_info drm_agp_info_t; 897 885 typedef struct drm_scatter_gather drm_scatter_gather_t; 898 886 typedef struct drm_set_version drm_set_version_t; 887 + #endif 888 + 889 + #if defined(__cplusplus) 890 + } 899 891 #endif 900 892 901 893 #endif
+8
include/uapi/drm/drm_fourcc.h
··· 26 26 27 27 #include "drm.h" 28 28 29 + #if defined(__cplusplus) 30 + extern "C" { 31 + #endif 32 + 29 33 #define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \ 30 34 ((__u32)(c) << 16) | ((__u32)(d) << 24)) 31 35 ··· 232 228 * For more information: see https://linuxtv.org/downloads/v4l-dvb-apis/re32.html 233 229 */ 234 230 #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1) 231 + 232 + #if defined(__cplusplus) 233 + } 234 + #endif 235 235 236 236 #endif /* DRM_FOURCC_H */
+8
include/uapi/drm/drm_mode.h
··· 29 29 30 30 #include "drm.h" 31 31 32 + #if defined(__cplusplus) 33 + extern "C" { 34 + #endif 35 + 32 36 #define DRM_DISPLAY_INFO_LEN 32 33 37 #define DRM_CONNECTOR_NAME_LEN 32 34 38 #define DRM_DISPLAY_MODE_LEN 32 ··· 626 622 struct drm_mode_destroy_blob { 627 623 __u32 blob_id; 628 624 }; 625 + 626 + #if defined(__cplusplus) 627 + } 628 + #endif 629 629 630 630 #endif
+8
include/uapi/drm/drm_sarea.h
··· 34 34 35 35 #include "drm.h" 36 36 37 + #if defined(__cplusplus) 38 + extern "C" { 39 + #endif 40 + 37 41 /* SAREA area needs to be at least a page */ 38 42 #if defined(__alpha__) 39 43 #define SAREA_MAX 0x2000U ··· 85 81 typedef struct drm_sarea_drawable drm_sarea_drawable_t; 86 82 typedef struct drm_sarea_frame drm_sarea_frame_t; 87 83 typedef struct drm_sarea drm_sarea_t; 84 + #endif 85 + 86 + #if defined(__cplusplus) 87 + } 88 88 #endif 89 89 90 90 #endif /* _DRM_SAREA_H_ */