]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/win32,dokan: include bcrypt.h for NTSTATUS
authorKefu Chai <tchaikov@gmail.com>
Thu, 21 Jul 2022 23:28:37 +0000 (07:28 +0800)
committerKefu Chai <tchaikov@gmail.com>
Fri, 22 Jul 2022 16:14:35 +0000 (00:14 +0800)
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 <command-line>:
/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 <tchaikov@gmail.com>
src/dokan/ceph_dokan.h

index acc50c01e690fbc12a31eee94d83c2e3d92d1e2d..7f25867f007852713fb8281bb2ea15f2418b7dac 100644 (file)
 #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 <bcrypt.h>  // for typedef of NTSTATUS
 #include <dokan.h>
 
 struct Config {