diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-04-16 15:28:59 -0700 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-04-17 09:44:11 +0000 |
commit | 34d2fd14979198dc0fcc07f73581ece9540c4b72 (patch) | |
tree | 40ffca0d5378f5c2704b69f67657f5c33d915ada /src | |
parent | 3bea9450e90a6c8db1554faa5b467186e63b31a0 (diff) |
Fix build with libdrm >= 2.4.78
drmEventContext has grown by one pointer, so the build fails with an
error about a member without initialization.
qeglfskmsgbmdevice.cpp:147:5: error: missing initializer for member ‘_drmEventContext::page_flip_handler2’ [-Werror=missing-field-initializers]
Change-Id: I0e1a09998253489388abfffd14b6014b1ddc90e1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp | 10 | ||||
-rw-r--r-- | src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp index 2040d6bc0e..5f85e4b0b0 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp @@ -140,11 +140,11 @@ void QEglFSKmsGbmDevice::destroyGlobalCursor() void QEglFSKmsGbmDevice::handleDrmEvent() { - drmEventContext drmEvent = { - DRM_EVENT_CONTEXT_VERSION, - Q_NULLPTR, // vblank handler - pageFlipHandler // page flip handler - }; + drmEventContext drmEvent; + memset(&drmEvent, 0, sizeof(drmEvent)); + drmEvent.version = DRM_EVENT_CONTEXT_VERSION; + drmEvent.vblank_handler = nullptr; + drmEvent.page_flip_handler = pageFlipHandler; drmHandleEvent(fd(), &drmEvent); } diff --git a/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp index 2ca251c4af..c9fbb8281c 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp +++ b/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp @@ -312,11 +312,11 @@ void QLinuxFbDevice::swapBuffers(Output *output) const int fbIdx = output->backFb; while (output->backFb == fbIdx) { - drmEventContext drmEvent = { - DRM_EVENT_CONTEXT_VERSION, - nullptr, - pageFlipHandler - }; + drmEventContext drmEvent; + memset(&drmEvent, 0, sizeof(drmEvent)); + drmEvent.version = DRM_EVENT_CONTEXT_VERSION; + drmEvent.vblank_handler = nullptr; + drmEvent.page_flip_handler = pageFlipHandler; // Blocks until there is something to read on the drm fd // and calls back pageFlipHandler once the flip completes. drmHandleEvent(fd(), &drmEvent); |