Commit af8020e7 authored by Tomoyuki Sahara's avatar Tomoyuki Sahara

sa_family_t is not defined on windows.

parent 2eeac910
......@@ -681,7 +681,7 @@ mrb_socket_sockaddr_family(mrb_state *mrb, mrb_value klass)
mrb_value str;
mrb_get_args(mrb, "S", &str);
if ((size_t)RSTRING_LEN(str) < offsetof(struct sockaddr, sa_family) + sizeof(sa_family_t)) {
if ((size_t)RSTRING_LEN(str) < offsetof(struct sockaddr, sa_family) + sizeof(sa->sa_family)) {
mrb_raisef(mrb, E_SOCKET_ERROR, "invalid sockaddr (too short)");
}
sa = (const struct sockaddr *)RSTRING_PTR(str);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment