From 3c4b6c0b971902c4c96f5633acb0b4978fcc9d4a Mon Sep 17 00:00:00 2001 From: Jordan Sissel Date: Wed, 1 May 2013 06:04:31 +0000 Subject: [PATCH] - fix? --- lib/logstash/util.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/logstash/util.rb b/lib/logstash/util.rb index 3d9454091..b8ab637c1 100644 --- a/lib/logstash/util.rb +++ b/lib/logstash/util.rb @@ -8,15 +8,14 @@ module LogStash::Util else; RbConfig::CONFIG["host_os"] end - if UNAME == "linux" - module LibC + module LibC + if UNAME == "linux" + require "ffi" extend FFI::Library - if UNAME == "linux" - ffi_lib 'c' + ffi_lib 'c' - # Ok so the 2nd arg isn't really a string... but whaatever - attach_function :prctl, [:int, :string, :long, :long, :long], :int - end + # Ok so the 2nd arg isn't really a string... but whaatever + attach_function :prctl, [:int, :string, :long, :long, :long], :int end end