mirror of https://github.com/grpc/grpc.git
[Build] Enable vsock support for Android (#37733)
The existing code fails to enable vsock on Android because it tries to enable vsock on Android when: a) a certain Linux version is detected b) and a certain libc is present. For a), it requires that `<linux/version.h>` is included. For b), Android does not use glibc. Instead `AF_VSOCK` is included since NDK version 14. This commit fixes both issues by including the needed Linux header and detecting the `__NDK_MAJOR__` version. For context, AOSP, has it always enabled:python/sync/typings06fb97455f
%5E%21/src/core/lib/iomgr/port.h But this patch compiles with older NDK version, in case someone is still using them. <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> Closes #37733 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/37733 from ricardoquesadawork:android9b27187337
PiperOrigin-RevId: 685868655
parent
7c766e2a72
commit
ddfaa3402f
2 changed files with 8 additions and 2 deletions
Loading…
Reference in new issue