Upstream mesa renamed gbm_bo_get_pitch() to gbm_bo_get_stride(). As gbm
has not seen an official release, they actually don't care but several
users complained about this. Therefore, we simply add a build-time check
for this. However, this may break when mesa is updated without recompiling
kmscon but that is less intrusive.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
AM_CONDITIONAL([UTERM_HAVE_DRM], [test x$drm_enabled = xyes])
AM_CONDITIONAL([KMSCON_HAVE_GLES2], [test x$gles2_enabled = xyes])
+AC_CHECK_DECLS([gbm_bo_get_stride], [], [], [[#include <gbm.h>]])
+
#
# xkbcommon keyboard backend
# This checks for the xkbcommon library for keyboard handling in uterm. If it is
return -EFAULT;
}
+#if defined(HAVE_DECL_GBM_BO_GET_STRIDE) && HAVE_DECL_GBM_BO_GET_STRIDE
stride = gbm_bo_get_stride(rb->bo);
+#else
+ stride = gbm_bo_get_pitch(rb->bo);
+#endif
handle = gbm_bo_get_handle(rb->bo).u32;
/* TODO: how can we choose 24/32 dynamically? */