-#ifdef G_OS_WIN32
-
-#define _WIN32_WINNT 0x0501
-#include <winsock2.h>
-#undef interface
-#include <ws2tcpip.h>
-#include <windns.h>
-#include <mswsock.h>
-
-#ifdef HAVE_WSPIAPI_H
-/* <wspiapi.h> in the Windows SDK and in mingw-w64 has wrappers for
- * inline workarounds for getaddrinfo, getnameinfo and freeaddrinfo if
- * they aren't present at run-time (on Windows 2000).
- */
-#include <wspiapi.h>
-#endif
-
-#else /* !G_OS_WIN32 */
-
-/* need this for struct ucred on Linux */
-#ifdef __linux__
-#define __USE_GNU
-#include <sys/types.h>
-#include <sys/socket.h>
-#undef __USE_GNU
-#endif
-
-#include <sys/types.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#if defined(HAVE_ARPA_NAMESER_COMPAT_H) && !defined(GETSHORT)
-#include <arpa/nameser_compat.h>
-#endif
-
-#ifndef T_SRV
-#define T_SRV 33
-#endif
-
-/* We're supposed to define _GNU_SOURCE to get EAI_NODATA, but that
- * won't actually work since <features.h> has already been included at
- * this point. So we define __USE_GNU instead.
- */
-#define __USE_GNU
-#include <netdb.h>
-#undef __USE_GNU
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <resolv.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#ifndef _PATH_RESCONF
-#define _PATH_RESCONF "/etc/resolv.conf"
-#endif
-
-#ifndef CMSG_LEN
-/* CMSG_LEN and CMSG_SPACE are defined by RFC 2292, but missing on
- * some older platforms.
- */
-#define CMSG_LEN(len) ((size_t)CMSG_DATA((struct cmsghdr *)NULL) + (len))
-
-/* CMSG_SPACE must add at least as much padding as CMSG_NXTHDR()
- * adds. We overestimate here.
- */
-#define ALIGN_TO_SIZEOF(len, obj) (((len) + sizeof (obj) - 1) & ~(sizeof (obj) - 1))
-#define CMSG_SPACE(len) ALIGN_TO_SIZEOF (CMSG_LEN (len), struct cmsghdr)
-#endif
-#endif