aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/fix-build-on-non-x86.patch
diff options
context:
space:
mode:
authorEtienne Cordonnier <ecordonnier@snap.com>2023-03-21 11:03:11 +0100
committerKhem Raj <raj.khem@gmail.com>2023-03-22 10:47:55 -0700
commit3add35fa2dfe1d19148657c41a2a37ed3f9c3064 (patch)
tree096dda836ede6a7f31ea146a0395b96dd22d19ce /meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/fix-build-on-non-x86.patch
parent05f092079853d0444af227edc6e4c91a4d374ee7 (diff)
downloadmeta-openembedded-contrib-3add35fa2dfe1d19148657c41a2a37ed3f9c3064.tar.gz
android-tools: update to 29.0.6.r14
Note: the adbd makefile can't be upstreamed to debian, because there is already an open PR upstream: https://salsa.debian.org/android-tools-team/android-platform-tools/-/merge_requests/4/diffs Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/fix-build-on-non-x86.patch')
-rw-r--r--meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/fix-build-on-non-x86.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/fix-build-on-non-x86.patch b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/fix-build-on-non-x86.patch
new file mode 100644
index 0000000000..98a5078244
--- /dev/null
+++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools/debian/fix-build-on-non-x86.patch
@@ -0,0 +1,24 @@
+Description: non-x86 arches do not have PAGE_SIZE
+Forwarded: not-needed
+--- a/system/core/base/cmsg.cpp
++++ b/system/core/base/cmsg.cpp
+@@ -33,7 +33,8 @@
+ const std::vector<int>& fds) {
+ size_t cmsg_space = CMSG_SPACE(sizeof(int) * fds.size());
+ size_t cmsg_len = CMSG_LEN(sizeof(int) * fds.size());
+- if (cmsg_space >= PAGE_SIZE) {
++ size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE));
++ if (cmsg_space >= pagesize) {
+ errno = ENOMEM;
+ return -1;
+ }
+@@ -75,7 +76,8 @@
+ fds->clear();
+
+ size_t cmsg_space = CMSG_SPACE(sizeof(int) * max_fds);
+- if (cmsg_space >= PAGE_SIZE) {
++ size_t pagesize = static_cast<size_t>(sysconf(_SC_PAGE_SIZE));
++ if (cmsg_space >= pagesize) {
+ errno = ENOMEM;
+ return -1;
+ }