Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
f1342065
Commit
f1342065
authored
8 years ago
by
Yuchen Zeng
Browse files
Options
Downloads
Patches
Plain Diff
Fix android build
parent
86ac76a0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/lib/iomgr/port.h
+4
-0
4 additions, 0 deletions
src/core/lib/iomgr/port.h
src/core/lib/iomgr/tcp_server_posix.c
+8
-1
8 additions, 1 deletion
src/core/lib/iomgr/tcp_server_posix.c
with
12 additions
and
1 deletion
src/core/lib/iomgr/port.h
+
4
−
0
View file @
f1342065
...
...
@@ -39,6 +39,7 @@
#if defined(GRPC_UV)
// Do nothing
#elif defined(GPR_MANYLINUX1)
#define GRPC_HAVE_IFADDRS 1
#define GRPC_HAVE_IPV6_RECVPKTINFO 1
#define GRPC_HAVE_IP_PKTINFO 1
#define GRPC_HAVE_MSG_NOSIGNAL 1
...
...
@@ -65,6 +66,7 @@
#define GRPC_POSIX_WAKEUP_FD 1
#define GRPC_TIMER_USE_GENERIC 1
#elif defined(GPR_LINUX)
#define GRPC_HAVE_IFADDRS 1
#define GRPC_HAVE_IPV6_RECVPKTINFO 1
#define GRPC_HAVE_IP_PKTINFO 1
#define GRPC_HAVE_MSG_NOSIGNAL 1
...
...
@@ -90,6 +92,7 @@
#define GRPC_POSIX_SOCKETUTILS
#endif
#elif defined(GPR_APPLE)
#define GRPC_HAVE_IFADDRS 1
#define GRPC_HAVE_SO_NOSIGPIPE 1
#define GRPC_HAVE_UNIX_SOCKET 1
#define GRPC_MSG_IOVLEN_TYPE int
...
...
@@ -100,6 +103,7 @@
#define GRPC_POSIX_WAKEUP_FD 1
#define GRPC_TIMER_USE_GENERIC 1
#elif defined(GPR_FREEBSD)
#define GRPC_HAVE_IFADDRS 1
#define GRPC_HAVE_IPV6_RECVPKTINFO 1
#define GRPC_HAVE_SO_NOSIGPIPE 1
#define GRPC_HAVE_UNIX_SOCKET 1
...
...
This diff is collapsed.
Click to expand it.
src/core/lib/iomgr/tcp_server_posix.c
+
8
−
1
View file @
f1342065
...
...
@@ -42,9 +42,12 @@
#include
"src/core/lib/iomgr/tcp_server.h"
#ifdef GRPC_HAVE_IFADDRS
#include
<ifaddrs.h>
#endif
/* GRPC_HAVE_IFADDRS */
#include
<errno.h>
#include
<fcntl.h>
#include
<ifaddrs.h>
#include
<limits.h>
#include
<netinet/in.h>
#include
<netinet/tcp.h>
...
...
@@ -598,6 +601,7 @@ static grpc_error *add_all_local_addrs_to_server(grpc_tcp_server *s,
unsigned
port_index
,
int
requested_port
,
int
*
out_port
)
{
#ifdef GRPC_HAVE_IFADDRS
struct
ifaddrs
*
ifa
=
NULL
;
struct
ifaddrs
*
ifa_it
;
unsigned
fd_index
=
0
;
...
...
@@ -685,6 +689,9 @@ static grpc_error *add_all_local_addrs_to_server(grpc_tcp_server *s,
*
out_port
=
sp
->
port
;
return
GRPC_ERROR_NONE
;
}
#else
/* GRPC_HAVE_IFADDRS */
return
GRPC_ERROR_NONE
;
#endif
/* GRPC_HAVE_IFADDRS */
}
/* Treat :: or 0.0.0.0 as a family-agnostic wildcard. */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment