re-add grpc_set_socket_ipv6...

pull/5945/head
ahedberg 9 years ago
parent 8d7cff4143
commit c9bfd0040a
  1. 10
      src/core/iomgr/socket_utils_common_posix.c

@ -99,6 +99,16 @@ int grpc_set_socket_ip_pktinfo_if_possible(int fd) {
#endif #endif
} }
int grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) {
#ifdef GPR_HAVE_IPV6_RECVPKTINFO
int get_local_ip = 1;
return setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip,
sizeof(get_local_ip));
#else
return 1;
#endif
}
/* set a socket to close on exec */ /* set a socket to close on exec */
int grpc_set_socket_cloexec(int fd, int close_on_exec) { int grpc_set_socket_cloexec(int fd, int close_on_exec) {
int oldflags = fcntl(fd, F_GETFD, 0); int oldflags = fcntl(fd, F_GETFD, 0);

Loading…
Cancel
Save