• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef WIN32_LEAN_AND_MEAN
2 #define WIN32_LEAN_AND_MEAN
3 #endif
4 #undef  __CRT__NO_INLINE
5 #define __CRT__NO_INLINE
6 #include <winsock2.h>
7 #include <wspiapi.h>
8 
9 int WINAPI
WspiapiGetAddrInfo(const char * nodename,const char * servname,const struct addrinfo * hints,struct addrinfo ** res)10 WspiapiGetAddrInfo(const char *nodename, const char *servname,
11 		   const struct addrinfo *hints, struct addrinfo **res)
12 {
13   static WSPIAPI_PGETADDRINFO pfGetAddrInfo = NULL;
14   int err;
15 
16   if (!pfGetAddrInfo)
17     pfGetAddrInfo = (WSPIAPI_PGETADDRINFO) WspiapiLoad (0);
18   err = (*pfGetAddrInfo) (nodename, servname, hints, res);
19   WSASetLastError (err);
20   return err;
21 }
22