Skip to content
Permalink
Browse files
Added iovec and msghdr structures
These will be required by the upcoming release of rubysl-socket.
  • Loading branch information
YorickPeterse committed Nov 16, 2015
1 parent b9ca4b3 commit ba75b60ef43ddc4050bbd8b4086016954bd0bdf0
Showing 1 changed file with 21 additions and 0 deletions.
@@ -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"

0 comments on commit ba75b60

Please sign in to comment.