Differences From Artifact [a07fe0ff30]:
- File src/resolver.m — part of check-in [c7a45d0140] at 2017-05-17 00:13:13 on branch trunk — Add in_addr_t for MorphOS (user: js, size: 8709) [annotate] [blame] [check-ins using]
To Artifact [9669c4a7c7]:
- File
src/resolver.m
— part of check-in
[c658e97994]
at
2017-05-21 20:03:06
on branch trunk
— Cast several socket-related arguments to void *
This is required to make it work on MorphOS with -noixemul, as socket
functions take UBYTE * arguments instead then, resulting in a warning
about signedness because char is signed. (user: js, size: 8743) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
139 140 141 142 143 144 145 | struct sockaddr_in *addrs, *addrsIter; /* * If the host is an IP address, don't try resolving it. On the * Wii for example, the resolver will return an error if you * specify an IP address. */ | | > | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | struct sockaddr_in *addrs, *addrsIter; /* * If the host is an IP address, don't try resolving it. On the * Wii for example, the resolver will return an error if you * specify an IP address. */ if ((s_addr = inet_addr((const void *)[host UTF8String])) != INADDR_NONE) { of_resolver_result_t *tmp; struct sockaddr_in *addr; if ((ret = calloc(2, sizeof(*ret))) == NULL) @throw [OFOutOfMemoryException exceptionWithRequestedSize: 2 * sizeof(*ret)]; |
︙ | ︙ | |||
184 185 186 187 188 189 190 | ret[0] = tmp; ret[1] = NULL; return ret; } | | | | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | ret[0] = tmp; ret[1] = NULL; return ret; } if ((he = gethostbyname((const void *)[host UTF8String])) == NULL || he->h_addrtype != AF_INET) @throw [OFAddressTranslationFailedException exceptionWithHost: host error: h_errno]; count = 0; for (ip = he->h_addr_list; *ip != NULL; ip++) count++; |
︙ | ︙ |