Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made udp_server.c compile for iOS #3049

Merged
merged 1 commit into from
Aug 25, 2015

Conversation

murgatroid99
Copy link
Member

This is a temporary workaround for #3041.

@@ -235,8 +235,10 @@ static int prepare_socket(int fd, const struct sockaddr *addr, int addr_len) {
rc = setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip,
sizeof(get_local_ip));
if (rc == 0 && addr->sa_family == AF_INET6) {
#if !TARGET_OS_IPHONE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ifndef TARGET_OS_IPHONE?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

port_platform.h checks it with #if TARGET_OS_IPHONE. I just negated that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then you'd probably need at least a defined(APPLE) also, right?

On Mon, Aug 24, 2015 at 4:51 PM Michael Lumish notifications@github.com
wrote:

In src/core/iomgr/udp_server.c
#3049 (comment):

@@ -235,8 +235,10 @@ static int prepare_socket(int fd, const struct sockaddr *addr, int addr_len) {
rc = setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip,
sizeof(get_local_ip));
if (rc == 0 && addr->sa_family == AF_INET6) {
+#if !TARGET_OS_IPHONE

port_platform.h checks it with #if TARGET_OS_IPHONE. I just negated that.


Reply to this email directly or view it on GitHub
https://github.com/grpc/grpc/pull/3049/files#r37818914.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undefined variables default to 0.

@ctiller
Copy link
Member

ctiller commented Aug 25, 2015

LGTM then. Waiting on Jenkins.

ctiller added a commit that referenced this pull request Aug 25, 2015
@ctiller ctiller merged commit b5bf12b into grpc:master Aug 25, 2015
jcanizales added a commit to jcanizales/grpc that referenced this pull request Sep 29, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants