The real issue here is that you are including a wrong drm.h
. You are not using a package manager and also do not specify /usr/include/libdrm
in the include path. If one of these two is not done, the compiler is going to pick up /usr/include/drm.h
or another that has this issue. But the file from libdrm (/usr/include/libdrm/drm.h
) has this fixed.
Refer to the real drm.h
file — that already has Eric’s patch for this 4 years back:
struct drm_buf_map {
int count; /**< Length of the buffer list */
#ifdef __cplusplus
void *virt;
#else
void *virtual; /**< Mmap'd area in user-virtual */
#endif
struct drm_buf_pub *list; /**< Buffer information */
};