summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 2c888ae4c4..fbfbc37683 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -6959,6 +6959,19 @@ rb_w32_inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len)
}
/* License: Ruby's */
+int WSAAPI
+rb_w32_inet_pton(int af, const char *src, void *dst)
+{
+ typedef int (WSAAPI inet_pton_t)(int, const char*, void *);
+ inet_pton_t *pInetPton;
+ pInetPton = (inet_pton_t *)get_proc_address("ws2_32", "inet_pton", NULL);
+ if (pInetPton) {
+ return pInetPton(af, src, dst);
+ }
+ return 0;
+}
+
+/* License: Ruby's */
char
rb_w32_fd_is_text(int fd)
{