mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-25 07:00:52 -04:00
Fix Windows build with socket size
This commit is contained in:
parent
062503a903
commit
a910821506
2 changed files with 8 additions and 1 deletions
|
@ -55,4 +55,7 @@ if(WITH_XC_BROWSER)
|
|||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
|
||||
COMMENT "Changing linking of keepassxc-proxy")
|
||||
endif()
|
||||
if(MINGW)
|
||||
target_link_libraries(keepassxc-proxy Wtsapi32.lib Ws2_32.lib)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
#include <QCoreApplication>
|
||||
#include "NativeMessagingHost.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <Winsock2.h>
|
||||
#endif
|
||||
|
||||
NativeMessagingHost::NativeMessagingHost() : NativeMessagingBase()
|
||||
{
|
||||
m_localSocket = new QLocalSocket();
|
||||
|
@ -27,7 +31,7 @@ NativeMessagingHost::NativeMessagingHost() : NativeMessagingBase()
|
|||
int socketDesc = m_localSocket->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<char*>(&max), sizeof(max));
|
||||
}
|
||||
#ifdef Q_OS_WIN
|
||||
m_running.store(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue