mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Fix Windows build with socket size
This commit is contained in:
committed by
Jonathan White
parent
062503a903
commit
a910821506
@@ -55,4 +55,7 @@ if(WITH_XC_BROWSER)
|
|||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src
|
||||||
COMMENT "Changing linking of keepassxc-proxy")
|
COMMENT "Changing linking of keepassxc-proxy")
|
||||||
endif()
|
endif()
|
||||||
|
if(MINGW)
|
||||||
|
target_link_libraries(keepassxc-proxy Wtsapi32.lib Ws2_32.lib)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -18,6 +18,10 @@
|
|||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include "NativeMessagingHost.h"
|
#include "NativeMessagingHost.h"
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#include <Winsock2.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
NativeMessagingHost::NativeMessagingHost() : NativeMessagingBase()
|
NativeMessagingHost::NativeMessagingHost() : NativeMessagingBase()
|
||||||
{
|
{
|
||||||
m_localSocket = new QLocalSocket();
|
m_localSocket = new QLocalSocket();
|
||||||
@@ -27,7 +31,7 @@ NativeMessagingHost::NativeMessagingHost() : NativeMessagingBase()
|
|||||||
int socketDesc = m_localSocket->socketDescriptor();
|
int socketDesc = m_localSocket->socketDescriptor();
|
||||||
if (socketDesc) {
|
if (socketDesc) {
|
||||||
int max = NATIVE_MSG_MAX_LENGTH;
|
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
|
#ifdef Q_OS_WIN
|
||||||
m_running.store(true);
|
m_running.store(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user