diff --git a/lib/puppet/util/windows/api_types.rb b/lib/puppet/util/windows/api_types.rb index 3d6b6d4b38f..802ac4fa771 100644 --- a/lib/puppet/util/windows/api_types.rb +++ b/lib/puppet/util/windows/api_types.rb @@ -165,6 +165,9 @@ def read_com_memory_pointer(&block) # https://blogs.msdn.com/b/oldnewthing/archive/2011/03/28/10146459.aspx FFI.typedef :int32, :win32_bool + # The BOOLEAN data type (different to BOOL) is only 1 byte. + FFI.typedef :int8, :boolean + # Same as a LONG, a 32-bit signed integer FFI.typedef :int32, :hresult diff --git a/lib/puppet/util/windows/file.rb b/lib/puppet/util/windows/file.rb index 4f87db12752..bce7d63a573 100644 --- a/lib/puppet/util/windows/file.rb +++ b/lib/puppet/util/windows/file.rb @@ -397,7 +397,7 @@ def self.resolve_symlink(handle) begin ffi_lib :kernel32 attach_function_private :CreateSymbolicLinkW, - [:lpwstr, :lpwstr, :dword], :win32_bool + [:lpwstr, :lpwstr, :dword], :boolean rescue LoadError end