Skip to content

Commit

Permalink
identify dragonflybsd as a platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ahorek committed Oct 27, 2019
1 parent 6e631e0 commit 2dcc07d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ffi/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ module Platform
"netbsd"
when /openbsd/
"openbsd"
when /dragonfly/
"dragonflybsd"
when /sunos|solaris/
"solaris"
when /mingw|mswin/
Expand Down Expand Up @@ -92,9 +94,10 @@ def self.is_os(os)
IS_FREEBSD = is_os("freebsd")
IS_NETBSD = is_os("netbsd")
IS_OPENBSD = is_os("openbsd")
IS_DRAGONFLYBSD = is_os("dragonfly")
IS_SOLARIS = is_os("solaris")
IS_WINDOWS = is_os("windows")
IS_BSD = IS_MAC || IS_FREEBSD || IS_NETBSD || IS_OPENBSD
IS_BSD = IS_MAC || IS_FREEBSD || IS_NETBSD || IS_OPENBSD || IS_DRAGONFLYBSD

# Add the version for known ABI breaks
name_version = "12" if IS_FREEBSD && OSVERSION >= 12 # 64-bit inodes
Expand Down
2 changes: 2 additions & 0 deletions spec/ffi/fixtures/compile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ module TestLibrary
"freebsd"
when /openbsd/
"openbsd"
when /dragonfly/
"dragonflybsd"
when /sunos|solaris/
"solaris"
when /mswin|mingw/
Expand Down

0 comments on commit 2dcc07d

Please sign in to comment.