1 // Copyright 2021 The gRPC Authors
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 #ifndef GRPC_EVENT_ENGINE_PORT_H
15 #define GRPC_EVENT_ENGINE_PORT_H
17 #include <grpc/support/port_platform.h>
19 // Platform-specific sockaddr includes
20 #if defined(GPR_ANDROID) || defined(GPR_LINUX) || defined(GPR_APPLE) || \
21 defined(GPR_FREEBSD) || defined(GPR_OPENBSD) || defined(GPR_SOLARIS) || \
22 defined(GPR_AIX) || defined(GPR_NACL) || defined(GPR_FUCHSIA) || \
23 defined(GRPC_POSIX_SOCKET)
24 #define GRPC_EVENT_ENGINE_POSIX
25 #include <arpa/inet.h>
27 #include <netinet/in.h>
28 #include <sys/socket.h>
30 #elif defined(GPR_WINDOWS)
33 // must be included after the above
36 #error UNKNOWN PLATFORM
39 #endif // GRPC_EVENT_ENGINE_PORT_H