mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 18:32:12 +02:00
virglrenderer: Replace lseek64 with lseek
Fix build with musl (From OE-Core rev: 677e979255ea84933a9e91d993171b207ff3deb6) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
From a60f0658001d2e8e15ad980731d4130808d37d56 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 15 Dec 2022 12:58:57 -0800
|
||||
Subject: [PATCH] Replace lseek64 with lseek
|
||||
|
||||
meson defined _FILE_OFFSET_BITS=64 unconditionally, this implies that
|
||||
lseek and lseek64 are both same since they are using 64bit off_t,
|
||||
replacing lseek64 with lseek also helps in compiling with latest musl C
|
||||
library which has removed these from _GNU_SOURCE namespace unlike glibc
|
||||
where _GNU_SOURCE also implies _LARGEFILE64_SOURCE and the definition of
|
||||
lseek64 is still available.
|
||||
|
||||
Upstream-Status: Submitted [https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1003]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/proxy/proxy_context.c | 2 +-
|
||||
src/venus/vkr_context.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/proxy/proxy_context.c b/src/proxy/proxy_context.c
|
||||
index f2a035b..f20f7c8 100644
|
||||
--- a/src/proxy/proxy_context.c
|
||||
+++ b/src/proxy/proxy_context.c
|
||||
@@ -319,7 +319,7 @@ validate_resource_fd_shm(int fd, uint64_t expected_size)
|
||||
return false;
|
||||
}
|
||||
|
||||
- const uint64_t size = lseek64(fd, 0, SEEK_END);
|
||||
+ const uint64_t size = lseek(fd, 0, SEEK_END);
|
||||
if (size != expected_size) {
|
||||
proxy_log("failed to validate shm size(%" PRIu64 ") expected(%" PRIu64 ")", size,
|
||||
expected_size);
|
||||
diff --git a/src/venus/vkr_context.c b/src/venus/vkr_context.c
|
||||
index 9ecb9cd..1e5dc68 100644
|
||||
--- a/src/venus/vkr_context.c
|
||||
+++ b/src/venus/vkr_context.c
|
||||
@@ -359,7 +359,7 @@ vkr_context_get_blob_locked(struct virgl_context *base,
|
||||
return ret;
|
||||
|
||||
if (fd_type == VIRGL_RESOURCE_FD_DMABUF &&
|
||||
- (uint64_t)lseek64(fd, 0, SEEK_END) < blob_size) {
|
||||
+ (uint64_t)lseek(fd, 0, SEEK_END) < blob_size) {
|
||||
close(fd);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -12,6 +12,7 @@ DEPENDS = "libdrm libepoxy virtual/egl virtual/libgbm"
|
||||
SRCREV = "0922041ec6730122e0fec11404e6859e2efc4bc0"
|
||||
SRC_URI = "git://gitlab.freedesktop.org/virgl/virglrenderer.git;branch=master;protocol=https \
|
||||
file://0001-meson.build-use-python3-directly-for-python.patch \
|
||||
file://0001-Replace-lseek64-with-lseek.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
Reference in New Issue
Block a user