diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bb1949dfc..61f444e51 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -276,7 +276,7 @@ if (UNIX AND NOT APPLE) target_link_libraries(keepassx_core Qt5::DBus) endif() if(MINGW) - target_link_libraries(keepassx_core Wtsapi32.lib) + target_link_libraries(keepassx_core Wtsapi32.lib Ws2_32.lib) endif() if(MINGW) diff --git a/src/browser/NativeMessagingHost.cpp b/src/browser/NativeMessagingHost.cpp index 88b7dd722..d607698b7 100755 --- a/src/browser/NativeMessagingHost.cpp +++ b/src/browser/NativeMessagingHost.cpp @@ -23,6 +23,10 @@ #include "NativeMessagingHost.h" #include "BrowserSettings.h" +#ifdef Q_OS_WIN +#include +#endif + NativeMessagingHost::NativeMessagingHost(DatabaseTabWidget* parent) : NativeMessagingBase(), m_mutex(QMutex::Recursive), @@ -150,7 +154,7 @@ void NativeMessagingHost::newLocalMessage() int socketDesc = socket->socketDescriptor(); if (socketDesc) { int max = NATIVE_MSG_MAX_LENGTH; - setsockopt(socketDesc, SOL_SOCKET, SO_SNDBUF, &max, sizeof(max)); + setsockopt(socketDesc, SOL_SOCKET, SO_SNDBUF, reinterpret_cast(&max), sizeof(max)); } QByteArray arr = socket->readAll();