Skip to content
Permalink
Browse files

Fix disable-ipv6

  • Loading branch information...
michaelortmann committed Oct 23, 2019
1 parent 8b2243a commit a2b874fe7691a074a721e34aa04bf8ccc96efb70
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/net.c
@@ -130,14 +130,14 @@ char *iptostr(struct sockaddr *sa)
*/
int setsockname(sockname_t *addr, char *src, int port, int allowres)
{
char *src2 = src;
char *endptr;
long val;
IP ip;
struct hostent *hp;
int af = AF_UNSPEC;
#ifdef IPV6
char ip2[INET6_ADDRSTRLEN];
char *src2 = src;
int pref;
#else
char ip2[INET_ADDRSTRLEN];
@@ -151,7 +151,9 @@ int setsockname(sockname_t *addr, char *src, int port, int allowres)
ip = htonl(val);
if (inet_ntop(AF_INET, &ip, ip2, sizeof ip2)) {
debug2("net: setsockname(): ip %s -> %s", src, ip2);
#ifdef IPV6
src2 = ip2;
#endif
}
}
#ifdef IPV6

0 comments on commit a2b874f

Please sign in to comment.
You can’t perform that action at this time.