Changeset 163 in Main for trunk/Server/server.c


Ignore:
Timestamp:
Sep 26, 2024, 9:33:22 AM (7 weeks ago)
Author:
Nishi
Message:

add an option to disable getaddrinfo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/server.c

    r161 r163  
    3131
    3232#ifdef __MINGW32__
     33#ifndef NO_GETADDRINFO
    3334#include <ws2tcpip.h>
    3435#include <wspiapi.h>
     36#endif
    3537#include <winsock2.h>
    3638#include <process.h>
     
    4850#include <netinet/in.h>
    4951#include <netinet/tcp.h>
     52#ifndef NO_GETADDRINFO
    5053#include <netdb.h>
     54#endif
    5155#endif
    5256
     
    449453        char address[513];
    450454        address[0] = 0;
     455#ifndef NO_GETADDRINFO
    451456        struct sockaddr* sa = (struct sockaddr*)&addr;
    452457        getnameinfo(sa, sizeof(addr), address, 512, NULL, 0, NI_NUMERICHOST);
     458#endif
    453459
    454460        struct tw_http_request req;
Note: See TracChangeset for help on using the changeset viewer.