summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/getaddrinfo.c4
-rw-r--r--ext/socket/getnameinfo.c4
3 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bd20b47..f039de0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri May 3 13:35:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/socket/{getaddrinfo,getnameinfo}.c: define socklen_t if not
+ defined, e.g., older VC.
+
Fri May 3 13:29:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/win32.h (INTPTR_MAX, INTPTR_MIN, UINTPTR_MAX): also
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index af333f8..a17d12b 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -80,6 +80,10 @@
#include <socks.h>
#endif
+#ifndef HAVE_TYPE_SOCKLEN_T
+typedef int socklen_t;
+#endif
+
#include "addrinfo.h"
#include "sockport.h"
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index d0c17e1..4da9680 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -71,6 +71,10 @@
#include <socks.h>
#endif
+#ifndef HAVE_TYPE_SOCKLEN_T
+typedef int socklen_t;
+#endif
+
#include "addrinfo.h"
#include "sockport.h"