summaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2018-03-30 15:17:11 +0100
committerChristian Gmeiner <christian.gmeiner@gmail.com>2018-04-02 13:55:57 +0200
commit4f7cec00b6e2ccf8ee3b8575b77303e65c1acea9 (patch)
tree518eccd9576b0529c166721cdf335e87e51e2a90 /common.h
parentaac3788d2844872a0b66eb2994f773e13326d642 (diff)
downloadkmscube-4f7cec00b6e2ccf8ee3b8575b77303e65c1acea9.tar.gz
Use weak functions to handle lack of gbm modifiers
Add weak function declaration and check if they're valid prior to calling the functions. This allows us to remove conditional compilation, yet allowing the modifiers codepath to work if API is available. Cc: Christian Gmeiner <christian.gmeiner@gmail.com> Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'common.h')
-rw-r--r--common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common.h b/common.h
index dc87825..42eb236 100644
--- a/common.h
+++ b/common.h
@@ -57,6 +57,8 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy,
#endif
#endif /* EGL_EXT_platform_base */
+#define WEAK __attribute__((weak))
+
struct gbm {
struct gbm_device *dev;
struct gbm_surface *surface;