Fix windows building

Regression occured in 3a92e4
This commit is contained in:
Jonathan White 2018-04-26 23:04:36 -04:00
parent 056bbaa921
commit 062503a903
No known key found for this signature in database
GPG key ID: 440FC65F2E0C6E01
2 changed files with 6 additions and 2 deletions

View file

@ -23,6 +23,10 @@
#include "NativeMessagingHost.h"
#include "BrowserSettings.h"
#ifdef Q_OS_WIN
#include <Winsock2.h>
#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<char*>(&max), sizeof(max));
}
QByteArray arr = socket->readAll();