Fix build break for ion on 4.14 kernel [YOCIMX-2861]
The kernel header version check for the conditional
ion code should be testing if we have a 4.9 or 4.14 kernel.
What was coded tests that the kernel version is less
than 4.14.34. This causes a build break for 4.14 builds
because the standard libc headers are version 4.14.0.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
diff --git a/gst-libs/gst/allocators/gstionmemory.c b/gst-libs/gst/allocators/gstionmemory.c
index 5e0455c..4b1e1e4 100644
--- a/gst-libs/gst/allocators/gstionmemory.c
+++ b/gst-libs/gst/allocators/gstionmemory.c
@@ -75,7 +75,7 @@
GST_DEBUG ("ion DMA FD: %d", fd);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 34)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
struct ion_phys_dma_data data = {
.phys = 0,
.size = 0,
@@ -161,7 +161,7 @@
GstAllocationParams * params)
{
GstIONAllocator *self = GST_ION_ALLOCATOR (allocator);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 34)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
struct ion_allocation_data allocation_data = { 0 };
struct ion_fd_data fd_data = { 0 };
struct ion_handle_data handle_data = { 0 };
@@ -256,7 +256,7 @@
if (dma_fd >= 0) {
close (dma_fd);
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 34)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
handle_data.handle = ion_handle;
gst_ion_ioctl (self->fd, ION_IOC_FREE, &handle_data);
#endif