Commit 078827ad3fedb640e45e079a5d34e2771e04a36f
Some systems define IP_FREEBIND but don't implement it which result in setsockopt() failing. No need to die in that case, just ignore the error.
Yves Rutschle committed on 4/6/2017, 2:26:27 PMParent: 4413284420e2b1eb93d7f2630e237fd2f497f584
Files changed
common.c | changed |
common.c | ||
---|---|---|
@@ -132,10 +132,14 @@ | ||
132 | 132 | } |
133 | 133 | |
134 | 134 | if (IP_FREEBIND) { |
135 | 135 | res = setsockopt((*sockfd)[i], IPPROTO_IP, IP_FREEBIND, (char*)&one, sizeof(one)); |
136 | - check_res_dumpdie(res, addr, "setsockopt(IP_FREEBIND)"); | |
137 | - } | |
136 | + if (res == -1) { | |
137 | + fprintf(stderr, "%s:%s: %s\n", | |
138 | + sprintaddr(buf, sizeof(buf), addr), | |
139 | + syscall, | |
140 | + strerror(errno)); | |
141 | + } | |
138 | 142 | |
139 | 143 | res = bind((*sockfd)[i], addr->ai_addr, addr->ai_addrlen); |
140 | 144 | check_res_dumpdie(res, addr, "bind"); |
141 | 145 |
Built with git-ssb-web