diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-09-10 22:19:25 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-09-10 22:19:25 -0700 |
commit | ebc7ef268ca9536af6a4c5be1c80bcc79665d4e9 (patch) | |
tree | 7d45e728a6ac143c45c667292d7eb068e2e44870 /src/core/iomgr | |
parent | 6b8046375e15702493094598803c22ed3b8e1e65 (diff) |
Mac build fixes
Diffstat (limited to 'src/core/iomgr')
-rw-r--r-- | src/core/iomgr/pollset_multipoller_with_poll_posix.c | 3 | ||||
-rw-r--r-- | src/core/iomgr/tcp_posix.c | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/core/iomgr/pollset_multipoller_with_poll_posix.c b/src/core/iomgr/pollset_multipoller_with_poll_posix.c index f1bc60ba4e..cae260cab0 100644 --- a/src/core/iomgr/pollset_multipoller_with_poll_posix.c +++ b/src/core/iomgr/pollset_multipoller_with_poll_posix.c @@ -101,7 +101,8 @@ static void multipoll_with_poll_pollset_maybe_work( gpr_timespec now, int allow_synchronous_callback) { int timeout; int r; - size_t i, j, pfd_count, fd_count; + size_t i, j, fd_count; + nfds_t pfd_count; pollset_hdr *h; /* TODO(ctiller): inline some elements to avoid an allocation */ grpc_fd_watcher *watchers; diff --git a/src/core/iomgr/tcp_posix.c b/src/core/iomgr/tcp_posix.c index 81f04494eb..68f469c368 100644 --- a/src/core/iomgr/tcp_posix.c +++ b/src/core/iomgr/tcp_posix.c @@ -61,6 +61,12 @@ #define SENDMSG_FLAGS 0 #endif +#ifdef GPR_MSG_IOVLEN_TYPE +typedef GPR_MSG_IOVLEN_TYPE msg_iovlen_type; +#else +typedef size_t msg_iovlen_type; +#endif + int grpc_tcp_trace = 0; typedef struct { @@ -68,7 +74,7 @@ typedef struct { grpc_fd *em_fd; int fd; int finished_edge; - size_t iov_size; /* Number of slices to allocate per read attempt */ + msg_iovlen_type iov_size; /* Number of slices to allocate per read attempt */ size_t slice_size; gpr_refcount refcount; @@ -265,7 +271,7 @@ static grpc_endpoint_op_status tcp_read(grpc_endpoint *ep, static grpc_endpoint_op_status tcp_flush(grpc_tcp *tcp) { struct msghdr msg; struct iovec iov[MAX_WRITE_IOVEC]; - size_t iov_size; + msg_iovlen_type iov_size; ssize_t sent_length; size_t sending_length; size_t trailing; |