Skip to content

Commit

Permalink
Added iovec and msghdr structures
Browse files Browse the repository at this point in the history
These will be required by the upcoming release of rubysl-socket.
  • Loading branch information
Yorick Peterse committed Nov 16, 2015
1 parent b9ca4b3 commit ba75b60
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions rakelib/platform.rake
Expand Up @@ -119,6 +119,27 @@ file 'runtime/platform.conf' => deps do |task|
s.field :l_linger
end.write_config(f)

Rubinius::FFI::Generators::Structures.new 'iovec' do |s|
s.include 'sys/socket.h'
s.name 'struct iovec'

s.field :iov_base, :pointer
s.field :iov_len, :size_t
end.write_config(f)

Rubinius::FFI::Generators::Structures.new 'msghdr' do |s|
s.include 'sys/socket.h'
s.name 'struct msghdr'

s.field :msg_name, :pointer
s.field :msg_namelen, :int
s.field :msg_iov, :pointer
s.field :msg_iovlen, :size_t
s.field :msg_control, :pointer
s.field :msg_controllen, :size_t
s.field :msg_flags, :int
end.write_config(f)

Rubinius::FFI::Generators::Structures.new 'servent' do |s|
if BUILD_CONFIG[:windows]
s.include "winsock2.h"
Expand Down

0 comments on commit ba75b60

Please sign in to comment.