From daa782cd9287221b0a1c2bc73433ebcb537291cd Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 7 Jun 2020 15:22:10 +0300 Subject: [PATCH] Fix compilation error on MinGW. MinGW has nonstandard definition of PSECURITY_DESCRIPTOR, which requires a cast when calling WinAPI functions InitializeSecurityDescriptor and SetSecurityDescriptorDacl. This is done by Boost.WinAPI wrapper functions. Fixes https://github.com/boostorg/interprocess/issues/118. --- include/boost/interprocess/detail/win32_api.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/interprocess/detail/win32_api.hpp b/include/boost/interprocess/detail/win32_api.hpp index 76bd159..1bff8c3 100644 --- a/include/boost/interprocess/detail/win32_api.hpp +++ b/include/boost/interprocess/detail/win32_api.hpp @@ -716,9 +716,9 @@ class interprocess_all_access_security interprocess_all_access_security() : initialized(false) { - if(!InitializeSecurityDescriptor(&sd, security_descriptor_revision)) + if(!boost::winapi::InitializeSecurityDescriptor(&sd, security_descriptor_revision)) return; - if(!::SetSecurityDescriptorDacl(&sd, true, 0, false)) + if(!boost::winapi::SetSecurityDescriptorDacl(&sd, true, 0, false)) return; sa.lpSecurityDescriptor = &sd; sa.nLength = sizeof(interprocess_security_attributes);