Skip to content


Fix pty.rb use of libc on BSD. Fixes #2793.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Apr 2, 2015
1 parent f7017dc commit a54fba8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ruby/shared/pty.rb
Expand Up @@ -5,8 +5,8 @@ module PTY
module LibUtil
extend FFI::Library
ffi_lib FFI::Library::LIBC
# forkpty(3) is in libutil on linux, libc on MacOS/BSD
if FFI::Platform.linux?
# forkpty(3) is in libutil on linux and BSD, libc on MacOS
if FFI::Platform.linux? || (FFI::Platform.bsd? && !FFI::Platform.mac?)
ffi_lib 'libutil'
attach_function :forkpty, [ :buffer_out, :buffer_out, :buffer_in, :buffer_in ], :pid_t
Expand Down

0 comments on commit a54fba8

Please sign in to comment.