File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -140,12 +140,12 @@ def self.gethostbyname(hostname)
140
140
141
141
142
142
if a [ 4 ] == AF_INET
143
- offset , type = Truffle ::Socket :: Foreign :: SockaddrIn . layout [ : sin_addr]
144
- size = FFI . type_size ( type ) # TODO BJF 30-Apr-2017 This appears to be a bug in rubysl-socket?
143
+ offset = Truffle ::Config [ 'platform.sockaddr_in. sin_addr.offset' ]
144
+ size = Truffle :: Config [ 'platform.sockaddr_in.sin_addr.size' ]
145
145
addresses << sockaddr . byteslice ( offset , size )
146
146
elsif a [ 4 ] == AF_INET6
147
- offset , type = Truffle ::Socket :: Foreign :: SockaddrIn6 . layout [ : sin6_addr]
148
- size = FFI . type_size ( type ) # TODO BJF 30-Apr-2017 This appears to be a bug in rubysl-socket?
147
+ offset = Truffle ::Config [ 'platform.sockaddr_in6. sin6_addr.offset' ]
148
+ size = Truffle :: Config [ 'platform.sockaddr_in6.sin6_addr.size' ]
149
149
addresses << sockaddr . byteslice ( offset , size )
150
150
end
151
151
end
You can’t perform that action at this time.
0 commit comments