diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-07-05 21:32:29 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-07-07 09:00:59 -0700 |
| commit | 7e1752ee19ac1be2714f361c287f359c2b0841c3 (patch) | |
| tree | f0c3e08519a7cbe7159c7ece462bc66a39312187 /meta-python | |
| parent | 1b58a4e64f21e7f80f9ec7d8360af506da0df578 (diff) | |
| download | meta-openembedded-7e1752ee19ac1be2714f361c287f359c2b0841c3.tar.gz | |
python3-grpcio: Fix build on musl
Use off_t instead of deprecated off64_t LFS interface
makes it portable across musl and glibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-grpcio/0001-direct_mmap-Use-off_t-on-linux.patch | 42 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-grpcio_1.56.0.bb | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-grpcio/0001-direct_mmap-Use-off_t-on-linux.patch b/meta-python/recipes-devtools/python/python3-grpcio/0001-direct_mmap-Use-off_t-on-linux.patch new file mode 100644 index 0000000000..49df528d7e --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-grpcio/0001-direct_mmap-Use-off_t-on-linux.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 45fdade6c0415ec5af3f9312e6311a4ccc682a7b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 28 Dec 2022 18:24:21 -0800 | ||
| 4 | Subject: [PATCH] direct_mmap: Use off_t on linux | ||
| 5 | |||
| 6 | off64_t is not provided without defining _LARGEFILE64_SOURCE on musl | ||
| 7 | this define is not defined automatically like glibc where it gets | ||
| 8 | defined when _GNU_SOURCE is defined. Using off_t makes it portable | ||
| 9 | across 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 | |||
| 12 | Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/1349] | ||
| 13 | Signed-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 | diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h | ||
| 19 | index 815b8d23..fdf88f0b 100644 | ||
| 20 | --- a/absl/base/internal/direct_mmap.h | ||
| 21 | +++ b/absl/base/internal/direct_mmap.h | ||
| 22 | @@ -72,7 +72,7 @@ namespace base_internal { | ||
| 23 | // Platform specific logic extracted from | ||
| 24 | // https://chromium.googlesource.com/linux-syscall-support/+/master/linux_syscall_support.h | ||
| 25 | inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, | ||
| 26 | - off64_t offset) noexcept { | ||
| 27 | + off_t offset) noexcept { | ||
| 28 | #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \ | ||
| 29 | defined(__m68k__) || defined(__sh__) || \ | ||
| 30 | (defined(__hppa__) && !defined(__LP64__)) || \ | ||
| 31 | @@ -102,7 +102,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, | ||
| 32 | #else | ||
| 33 | return reinterpret_cast<void*>( | ||
| 34 | syscall(SYS_mmap2, start, length, prot, flags, fd, | ||
| 35 | - static_cast<off_t>(offset / pagesize))); | ||
| 36 | + offset / pagesize)); | ||
| 37 | #endif | ||
| 38 | #elif defined(__s390x__) | ||
| 39 | // On s390x, mmap() arguments are passed in memory. | ||
| 40 | -- | ||
| 41 | 2.39.0 | ||
| 42 | |||
diff --git a/meta-python/recipes-devtools/python/python3-grpcio_1.56.0.bb b/meta-python/recipes-devtools/python/python3-grpcio_1.56.0.bb index 33c13b0a01..fc871adec4 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio_1.56.0.bb +++ b/meta-python/recipes-devtools/python/python3-grpcio_1.56.0.bb | |||
| @@ -11,6 +11,7 @@ SRC_URI:append:class-target = " file://ppc-boringssl-support.patch \ | |||
| 11 | file://mips_bigendian.patch \ | 11 | file://mips_bigendian.patch \ |
| 12 | file://0001-Include-missing-cstdint-header.patch \ | 12 | file://0001-Include-missing-cstdint-header.patch \ |
| 13 | file://abseil-ppc-fixes.patch;patchdir=third_party/abseil-cpp \ | 13 | file://abseil-ppc-fixes.patch;patchdir=third_party/abseil-cpp \ |
| 14 | file://0001-direct_mmap-Use-off_t-on-linux.patch;patchdir=third_party/abseil-cpp \ | ||
| 14 | file://0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch \ | 15 | file://0001-zlib-Include-unistd.h-for-open-close-C-APIs.patch \ |
| 15 | " | 16 | " |
| 16 | SRC_URI[sha256sum] = "4c08ee21b3d10315b8dc26f6c13917b20ed574cdbed2d2d80c53d5508fdcc0f2" | 17 | SRC_URI[sha256sum] = "4c08ee21b3d10315b8dc26f6c13917b20ed574cdbed2d2d80c53d5508fdcc0f2" |
