diff --git a/src/raspberrypi/rascsi.cpp b/src/raspberrypi/rascsi.cpp index 91b1dc3e..e0e8bf8c 100644 --- a/src/raspberrypi/rascsi.cpp +++ b/src/raspberrypi/rascsi.cpp @@ -1116,6 +1116,8 @@ int startrascsi(void) int main(int argc, char* argv[]) { #endif // BAREMETAL + GOOGLE_PROTOBUF_VERIFY_VERSION; + int i; int actid; DWORD now; diff --git a/src/raspberrypi/rasctl.cpp b/src/raspberrypi/rasctl.cpp index 43fd56f2..852a6ced 100644 --- a/src/raspberrypi/rasctl.cpp +++ b/src/raspberrypi/rasctl.cpp @@ -82,6 +82,8 @@ BOOL SendCommand(const char *hostname, const Command& command) //--------------------------------------------------------------------------- int main(int argc, char* argv[]) { + GOOGLE_PROTOBUF_VERIFY_VERSION; + // Display help if (argc < 2) { cerr << "SCSI Target Emulator RaSCSI Controller" << endl; diff --git a/src/raspberrypi/rasutil.cpp b/src/raspberrypi/rasutil.cpp index a0e990ad..b5382cec 100644 --- a/src/raspberrypi/rasutil.cpp +++ b/src/raspberrypi/rasutil.cpp @@ -25,7 +25,7 @@ using namespace std; void SerializeProtobufData(int fd, const string& data) { // Write the size of the protobuf data as a header - ssize_t size = data.length(); + int32_t size = data.length(); if (write(fd, &size, sizeof(size)) != sizeof(size)) { throw ioexception("Cannot write protobuf header"); } @@ -45,7 +45,7 @@ void SerializeProtobufData(int fd, const string& data) string DeserializeProtobufData(int fd) { // First read the header with the size of the protobuf data - size_t size; + int32_t size; if (read(fd, &size, sizeof(int)) != sizeof(int)) { // No more data return "";