summaryrefslogtreecommitdiffstats
path: root/meta-python
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-07-07 09:55:52 -0700
committerKhem Raj <raj.khem@gmail.com>2023-07-07 14:35:29 -0700
commitcc9d61c5a9fc1693f749abcd511042d8d507e1e6 (patch)
treea53f5b77dd33b99fee8f617e2cfeacf82b570075 /meta-python
parent7e1752ee19ac1be2714f361c287f359c2b0841c3 (diff)
downloadmeta-openembedded-cc9d61c5a9fc1693f749abcd511042d8d507e1e6.tar.gz
python3-grpcio-tools: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
-rw-r--r--meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch37
-rw-r--r--meta-python/recipes-devtools/python/python3-grpcio-tools_1.56.0.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch
new file mode 100644
index 0000000000..9b3e5d4a5f
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-grpcio-tools/0001-direct_mmap-Use-off_t-on-linux.patch
@@ -0,0 +1,37 @@
1From 45fdade6c0415ec5af3f9312e6311a4ccc682a7b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 28 Dec 2022 18:24:21 -0800
4Subject: [PATCH] direct_mmap: Use off_t on linux
5
6off64_t is not provided without defining _LARGEFILE64_SOURCE on musl
7this define is not defined automatically like glibc where it gets
8defined when _GNU_SOURCE is defined. Using off_t makes it portable
9across musl/glibc and for using 64bit off_t on glibc 32bit systems
10-D_FILE_OFFSET_BITS=64 can be defined during build via CXXFLAGS
11
12Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/1349]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 absl/base/internal/direct_mmap.h | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18--- a/third_party/abseil-cpp/absl/base/internal/direct_mmap.h
19+++ b/third_party/abseil-cpp/absl/base/internal/direct_mmap.h
20@@ -72,7 +72,7 @@ namespace base_internal {
21 // Platform specific logic extracted from
22 // https://chromium.googlesource.com/linux-syscall-support/+/master/linux_syscall_support.h
23 inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
24- off64_t offset) noexcept {
25+ off_t offset) noexcept {
26 #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \
27 defined(__m68k__) || defined(__sh__) || \
28 (defined(__hppa__) && !defined(__LP64__)) || \
29@@ -102,7 +102,7 @@ inline void* DirectMmap(void* start, siz
30 #else
31 return reinterpret_cast<void*>(
32 syscall(SYS_mmap2, start, length, prot, flags, fd,
33- static_cast<off_t>(offset / pagesize)));
34+ offset / pagesize));
35 #endif
36 #elif defined(__s390x__)
37 // On s390x, mmap() arguments are passed in memory.
diff --git a/meta-python/recipes-devtools/python/python3-grpcio-tools_1.56.0.bb b/meta-python/recipes-devtools/python/python3-grpcio-tools_1.56.0.bb
index eb1994d7ce..8fbe1fa91f 100644
--- a/meta-python/recipes-devtools/python/python3-grpcio-tools_1.56.0.bb
+++ b/meta-python/recipes-devtools/python/python3-grpcio-tools_1.56.0.bb
@@ -11,6 +11,7 @@ DEPENDS += "${PYTHON_PN}-grpcio"
11 11
12SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch \ 12SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch \
13 file://0001-protobuf-Disable-musttail-attribute-on-mips.patch \ 13 file://0001-protobuf-Disable-musttail-attribute-on-mips.patch \
14 file://0001-direct_mmap-Use-off_t-on-linux.patch \
14 " 15 "
15SRC_URI[sha256sum] = "39f5877cea514b3da9f2683dfb3ffb45ef47b05f4ff39c287d7d61c5057f48b8" 16SRC_URI[sha256sum] = "39f5877cea514b3da9f2683dfb3ffb45ef47b05f4ff39c287d7d61c5057f48b8"
16 17