Skip to content

Commit f6534b1

Browse files
author
Yorick Peterse
committedDec 4, 2015
Added hostent structure
This is required by gethostbyname() which in turn will be used by rubysl-socket.
1 parent fd97eb1 commit f6534b1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

‎rakelib/platform.rake

+11
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,17 @@ file 'runtime/platform.conf' => deps do |task|
108108
sockaddr_un.write_config f if sockaddr_un.found?
109109
end
110110

111+
Rubinius::FFI::Generators::Structures.new 'hostent' do |s|
112+
s.include 'netdb.h'
113+
s.name 'struct hostent'
114+
115+
s.field :h_name, :string
116+
s.field :h_aliases, :pointer
117+
s.field :h_addrtype, :int
118+
s.field :h_length, :int
119+
s.field :h_addr_list, :pointer
120+
end.write_config(f)
121+
111122
Rubinius::FFI::Generators::Structures.new 'linger' do |s|
112123
if BUILD_CONFIG[:windows]
113124
s.include "winsock2.h"

0 commit comments

Comments
 (0)
Please sign in to comment.