x11-libs/libva-vdpau-driver: Fix build with >=x11-libs/libva-2.5.0
authorMatt Turner <mattst88@gentoo.org>
Mon, 15 Jul 2019 23:35:46 +0000 (16:35 -0700)
committerMatt Turner <mattst88@gentoo.org>
Mon, 15 Jul 2019 23:42:46 +0000 (16:42 -0700)
Closes: https://bugs.gentoo.org/689530
Signed-off-by: Matt Turner <mattst88@gentoo.org>
x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch [new file with mode: 0644]
x11-libs/libva-vdpau-driver/libva-vdpau-driver-0.7.4-r5.ebuild

diff --git a/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch b/x11-libs/libva-vdpau-driver/files/libva-vdpau-driver-0.7.4-include-linux-videodev2.h.patch
new file mode 100644 (file)
index 0000000..0d92074
--- /dev/null
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/689530
+
+libva commit 93c52a17b8d2 ("va_backend: remove unneeded
+linux/videodev2.h include") removed an include that provided the
+prototype of v4l2_format among other v4l2_* structs.
+
+Without this or a forward declaration of 'struct v4l2_format', the prototype
+and definition of vdpau_CreateSurfaceFromV4L2Buf() (which has a 'struct
+v4l2_format *' parameter) are seen as conflicting.
+
+Just include the removed header where we need it.
+
+diff --git a/src/vdpau_driver.h b/src/vdpau_driver.h
+index 6286d16..54d37fb 100644
+--- a/src/vdpau_driver.h
++++ b/src/vdpau_driver.h
+@@ -21,6 +21,8 @@
+ #ifndef VDPAU_DRIVER_H
+ #define VDPAU_DRIVER_H
++#include <linux/videodev2.h>
++
+ #include <va/va_backend.h>
+ #include "vaapi_compat.h"
+ #include "vdpau_gate.h"
index fb0c732ebe5e731ff344a605a75fcc4a1e3bf5e0..a45dc7f4511f9d8e56c2d68eb463126b8afab6d8 100644 (file)
@@ -29,6 +29,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-VAEncH264VUIBufferType.patch
        "${FILESDIR}"/${P}-libvdpau-0.8.patch
        "${FILESDIR}"/${P}-sigfpe-crash.patch
+       "${FILESDIR}"/${P}-include-linux-videodev2.h.patch
 )
 
 src_prepare() {