diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c index 4a9f51acf..e1d098e7d 100644 --- a/cogl/winsys/cogl-winsys-egl-kms.c +++ b/cogl/winsys/cogl-winsys-egl-kms.c @@ -51,6 +51,7 @@ #include "cogl-onscreen-private.h" #include "cogl-kms-renderer.h" #include "cogl-kms-display.h" +#include "cogl-version.h" static const CoglWinsysEGLVtable _cogl_winsys_egl_vtable; @@ -676,7 +677,8 @@ _cogl_winsys_onscreen_swap_buffers (CoglOnscreen *onscreen) /* Now we need to set the CRTC to whatever is the front buffer */ kms_onscreen->next_bo = gbm_surface_lock_front_buffer (kms_onscreen->surface); -#if COGL_GBM_MAJOR >= 8 && COGL_GBM_MINOR >= 1 +#if (COGL_VERSION_ENCODE (COGL_GBM_MAJOR, COGL_GBM_MINOR, COGL_GBM_MICRO) >= \ + COGL_VERSION_ENCODE (8, 1, 0)) stride = gbm_bo_get_stride (kms_onscreen->next_bo); #else stride = gbm_bo_get_pitch (kms_onscreen->next_bo);