From 1a09e520bf26f61cb048d9d3d3876f284af64b04 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 22 Jul 2022 07:28:37 +0800 Subject: [PATCH] common/win32,dokan: include bcrypt.h for NTSTATUS to avoid the conflicting declaration of NTSTATUS from bcrypt.h and our own typedef. as after switching to boost 1.79, we would have following compiling failure: In file included from ../src/dokan/options.cc:14: ../src/dokan/ceph_dokan.h:16:15: error: conflicting declaration 'typedef DWORD NTSTATUS' 16 | typedef DWORD NTSTATUS; | ^~~~~~~~ In file included from ../build.deps/mingw/boost/include/boost/asio/impl/connect_pipe.ipp:29, from ../build.deps/mingw/boost/include/boost/asio/connect_pipe.hpp:79, from ../build.deps/mingw/boost/include/boost/asio.hpp:64, from ../src/include/win32/winsock_wrapper.h:20, from : /usr/share/mingw-w64/include/bcrypt.h:27:16: note: previous declaration as 'typedef LONG NTSTATUS' 27 | typedef LONG NTSTATUS,*PNTSTATUS; | ^~~~~~~~ Signed-off-by: Kefu Chai --- src/dokan/ceph_dokan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dokan/ceph_dokan.h b/src/dokan/ceph_dokan.h index acc50c01e690f..7f25867f00785 100644 --- a/src/dokan/ceph_dokan.h +++ b/src/dokan/ceph_dokan.h @@ -13,10 +13,10 @@ #define CEPH_DOKAN_IO_DEFAULT_TIMEOUT 60 * 5 // Seconds #define CEPH_DOKAN_DEFAULT_THREAD_COUNT 10 -typedef DWORD NTSTATUS; // Avoid conflicting COM types, exposed when using C++. #define _OLE2_H_ +#include // for typedef of NTSTATUS #include struct Config { -- 2.39.5