mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-03-19 21:06:02 -04:00
Fix Windows build with socket size
This commit is contained in:
parent
062503a903
commit
a910821506
@ -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…
x
Reference in New Issue
Block a user