diff options
author | Enrico Granata <egranata@google.com> | 2020-01-16 16:40:16 -0800 |
---|---|---|
committer | Enrico Granata <egranata@google.com> | 2020-01-16 16:40:16 -0800 |
commit | 8b547c4895c1455aada0406841b92343b186bc6e (patch) | |
tree | 79c8220409388c2c6a1b733a5f99a07d6a05e0d9 | |
parent | 32da54b6357bc8ccaeaeec121753b6c16bff1253 (diff) | |
download | grpc-grpc-8b547c4895c1455aada0406841b92343b186bc6e.tar.gz |
Include correct header files for sockaddr_vmandroid-r-preview-1
stdio.h is not required to compile this file, but we do need to include
the header files for vsock support in order to pull in the correct
types, if vsock is available.
Test: m libgrpc_base_c
Change-Id: If9eec872b973f2382aaad970dd97d37249344535
-rw-r--r-- | src/core/lib/iomgr/unix_sockets_posix.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/unix_sockets_posix.cc b/src/core/lib/iomgr/unix_sockets_posix.cc index 0cbe3e9f4e..49ced557c3 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.cc +++ b/src/core/lib/iomgr/unix_sockets_posix.cc @@ -19,11 +19,17 @@ #include "src/core/lib/iomgr/port.h" +#ifdef GRPC_HAVE_LINUX_VSOCK + +#include <sys/socket.h> +#include <linux/vm_sockets.h> + +#endif /* GRPC_HAVE_LINUX_VSOCK */ + #ifdef GRPC_HAVE_UNIX_SOCKET #include "src/core/lib/iomgr/sockaddr.h" -#include <stdio.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> |