diff --git a/src/ChunkedIO.cc b/src/ChunkedIO.cc index 67cfe6dd25..9ca8f23508 100644 --- a/src/ChunkedIO.cc +++ b/src/ChunkedIO.cc @@ -9,6 +9,8 @@ #include #include +#include + #include "config.h" #include "ChunkedIO.h" #include "NetVar.h" @@ -166,13 +168,13 @@ bool ChunkedIOFd::Write(Chunk* chunk) // We have to split it up. char* p = chunk->data; - unsigned long left = chunk->len; + uint32 left = chunk->len; while ( left ) { Chunk* part = new Chunk; - part->len = min(BUFFER_SIZE - sizeof(uint32), left); + part->len = min(BUFFER_SIZE - sizeof(uint32), left); part->data = new char[part->len]; memcpy(part->data, p, part->len); left -= part->len; diff --git a/src/LogMgr.cc b/src/LogMgr.cc index 165f954dc4..834829591a 100644 --- a/src/LogMgr.cc +++ b/src/LogMgr.cc @@ -1,5 +1,7 @@ // See the file "COPYING" in the main distribution directory for copyright. +#include + #include "LogMgr.h" #include "Event.h" #include "EventHandler.h" diff --git a/src/RemoteSerializer.cc b/src/RemoteSerializer.cc index a471c603ef..6f33a33bca 100644 --- a/src/RemoteSerializer.cc +++ b/src/RemoteSerializer.cc @@ -173,6 +173,8 @@ #endif #include +#include + #include "RemoteSerializer.h" #include "Func.h" #include "EventRegistry.h" @@ -2394,12 +2396,12 @@ bool RemoteSerializer::SendPrintHookEvent(BroFile* f, const char* txt) if ( ! fname ) continue; // not a managed file. - long unsigned int len = strlen(txt); + size_t len = strlen(txt); // We cut off everything after the max buffer size. That // makes the code a bit easier, and we shouldn't have such // long lines anyway. - len = min(len, PRINT_BUFFER_SIZE - strlen(fname) - 2); + len = min(len, PRINT_BUFFER_SIZE - strlen(fname) - 2); // If there's not enough space in the buffer, flush it.