Skip to content

Commit 1bb17e9

Browse files
committed
MinGW: Fix inet_pton also for 32-bit
1 parent 2b4c454 commit 1bb17e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ports/patches/freetds/1.00.21/0001-mingw_missing_inet_pton.diff renamed to ports/patches/freetds/1.00.27/0001-mingw_missing_inet_pton.diff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
diff --git a/src/tds/tls.c b/src/tds/tls.c
2-
index 0d11a33..b8ab2ba 100644
2+
index 09e7fa0..1da18f6 100644
33
--- a/src/tds/tls.c
44
+++ b/src/tds/tls.c
5-
@@ -72,6 +72,29 @@
6-
#define SSL_PTR bio->ptr
5+
@@ -101,6 +101,29 @@
6+
#define SSL_PTR BIO_get_data(bio)
77
#endif
88

99
+/*
1010
+ * Add a workaround for older Mingw versions without inet_pton().
1111
+ * This means RubyInstallers DevKit-4.7.2 in particular.
1212
+ */
13-
+#if defined(__MINGW64_VERSION_MAJOR) && !defined(InetPtonA)
13+
+#if defined(__MINGW32__) && !defined(InetPtonA)
1414
+ #include <windows.h>
1515
+
1616
+ static HMODULE ws2_32 = NULL;

0 commit comments

Comments
 (0)