diff options
author | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2016-03-21 16:55:10 -0700 |
---|---|---|
committer | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2016-03-21 16:55:10 -0700 |
commit | 029ecca5e5c17ac3a2232f4a115c0b2cf5f830e4 (patch) | |
tree | a3515892333da7f79906bf42d960db5e92f88b34 | |
parent | 86eece8c05015aedbf0cfba2386723f8a61395e5 (diff) | |
parent | aea32070ef96e2dc38a2b06c5fc9e80e4cd347d7 (diff) |
Merge pull request #5832 from vjpai/make_udp_server_test_great_again
Add needed include for udp_server_test
-rw-r--r-- | src/core/iomgr/udp_server.h | 9 | ||||
-rw-r--r-- | test/core/iomgr/udp_server_test.c | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/core/iomgr/udp_server.h b/src/core/iomgr/udp_server.h index 1e59a92392..148c04fa9b 100644 --- a/src/core/iomgr/udp_server.h +++ b/src/core/iomgr/udp_server.h @@ -37,15 +37,16 @@ #include "src/core/iomgr/endpoint.h" #include "src/core/iomgr/fd_posix.h" -/* Forward decl of grpc_server */ -typedef struct grpc_server grpc_server; +/* Forward decl of struct grpc_server */ +/* This is not typedef'ed to avoid a typedef-redefinition error */ +struct grpc_server; /* Forward decl of grpc_udp_server */ typedef struct grpc_udp_server grpc_udp_server; /* Called when data is available to read from the socket. */ typedef void (*grpc_udp_server_read_cb)(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, - grpc_server *server); + struct grpc_server *server); /* Create a server, initially not bound to any ports */ grpc_udp_server *grpc_udp_server_create(void); @@ -53,7 +54,7 @@ grpc_udp_server *grpc_udp_server_create(void); /* Start listening to bound ports */ void grpc_udp_server_start(grpc_exec_ctx *exec_ctx, grpc_udp_server *udp_server, grpc_pollset **pollsets, size_t pollset_count, - grpc_server *server); + struct grpc_server *server); int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned index); diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index ce3c23b4bf..365b5c002b 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -34,6 +34,7 @@ #include "src/core/iomgr/iomgr.h" #include "src/core/iomgr/pollset_posix.h" #include "src/core/iomgr/udp_server.h" +#include <grpc/grpc.h> #include <grpc/support/log.h> #include <grpc/support/sync.h> #include <grpc/support/time.h> |