Files
MINGW-packages/mingw-w64-git-git/0007-Include-winsock2.h-and-not-netdb.h-on-MinGW-w64.patch

28 lines
625 B
Diff

From f74603dd6d319f2a8a035055091833a68c26ac97 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Tue, 22 Jul 2014 00:29:15 +0100
Subject: [PATCH 07/16] Include winsock2.h and not netdb.h on MinGW-w64
---
compat/hstrerror.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/compat/hstrerror.c b/compat/hstrerror.c
index 069c555..d37ad25 100644
--- a/compat/hstrerror.c
+++ b/compat/hstrerror.c
@@ -1,6 +1,10 @@
#include <string.h>
#include <stdio.h>
+#ifdef __MINGW64_VERSION_MAJOR
+#include <winsock2.h>
+#else
#include <netdb.h>
+#endif
const char *githstrerror(int err)
{
--
2.1.2