master
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
9int WINAPI
10WspiapiGetAddrInfo(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 = (void*) WspiapiLoad (0);
18 err = (*pfGetAddrInfo) (nodename, servname, hints, res);
19 WSASetLastError (err);
20 return err;
21}