summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/socket.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e82caf06b2..dbd2e72f45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 7 12:10:52 2013 Tanaka Akira <[email protected]>
+
+ * ext/socket/socket.c (socket_s_ip_address_list): Cast EXTRA_SPACE as
+ int. This suppress a warning.
+
Tue May 7 12:09:29 2013 Tanaka Akira <[email protected]>
* ext/socket/extconf.rb: Set close_fds false for Cygwin.
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index a0c9618ce4..43bff85737 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1759,7 +1759,7 @@ socket_s_ip_address_list(VALUE self)
#elif defined(SIOCGIFCONF)
int fd = -1;
int ret;
-#define EXTRA_SPACE (sizeof(struct ifconf) + sizeof(union_sockaddr))
+#define EXTRA_SPACE ((int)(sizeof(struct ifconf) + sizeof(union_sockaddr)))
char initbuf[4096+EXTRA_SPACE];
char *buf = initbuf;
int bufsize;