Mercurial > repos > blastem
comparison megawifi.c @ 1966:b3c2dcae7dfc
Skip setting AI_NUMERICSERV in megawifi code on Windows for now so min SDK version does not need to be bumped
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 04 May 2020 23:58:37 -0700 |
parents | 16d46ff1f620 |
children | c16dabdb0aad |
comparison
equal
deleted
inserted
replaced
1965:3a46ff899fa6 | 1966:b3c2dcae7dfc |
---|---|
269 strncpy(host, (char*)&mw->transmit_buffer[17], MAX_RECV_SIZE - 14); | 269 strncpy(host, (char*)&mw->transmit_buffer[17], MAX_RECV_SIZE - 14); |
270 host[MAX_RECV_SIZE - 14] = '\0'; | 270 host[MAX_RECV_SIZE - 14] = '\0'; |
271 | 271 |
272 memset(&hints, 0, sizeof(hints)); | 272 memset(&hints, 0, sizeof(hints)); |
273 hints.ai_family = AF_INET; | 273 hints.ai_family = AF_INET; |
274 #ifndef _WIN32 | |
274 hints.ai_flags = AI_NUMERICSERV; | 275 hints.ai_flags = AI_NUMERICSERV; |
276 #endif | |
275 hints.ai_socktype = SOCK_STREAM; | 277 hints.ai_socktype = SOCK_STREAM; |
276 | 278 |
277 if ((err = getaddrinfo(host, dst_port, &hints, &res)) != 0) { | 279 if ((err = getaddrinfo(host, dst_port, &hints, &res)) != 0) { |
278 printf("getaddrinfo failed: %s\n", gai_strerror(err)); | 280 printf("getaddrinfo failed: %s\n", gai_strerror(err)); |
279 start_reply(mw, CMD_ERROR); | 281 start_reply(mw, CMD_ERROR); |