From 8a024eba12f15556a0d28ba81439b056dfe9d5eb Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Fri, 28 Nov 2008 17:53:09 +0000 Subject: some more type cleanups and missig NOCRYPT defines --- src/authAlgo.h | 2 ++ src/buffer.cpp | 2 +- src/encryptedPacket.h | 6 +++++- src/keyDerivation.h | 2 ++ src/threadUtils.hpp | 1 + 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/authAlgo.h b/src/authAlgo.h index 2e01c0b..3085673 100644 --- a/src/authAlgo.h +++ b/src/authAlgo.h @@ -36,7 +36,9 @@ #include "buffer.h" #include "encryptedPacket.h" +#ifndef NOCRYPT #include +#endif class AuthAlgo { diff --git a/src/buffer.cpp b/src/buffer.cpp index 23228eb..7a05ce2 100644 --- a/src/buffer.cpp +++ b/src/buffer.cpp @@ -86,7 +86,7 @@ Buffer::Buffer(std::string hex_data, bool allow_realloc) : length_(hex_data.size for(u_int32_t i=0; i> std::hex >> tmp)) tmp = 0; buf_[i] = tmp; diff --git a/src/encryptedPacket.h b/src/encryptedPacket.h index 1d834f5..a4356dd 100644 --- a/src/encryptedPacket.h +++ b/src/encryptedPacket.h @@ -135,7 +135,11 @@ private: seq_nr_t seq_nr; sender_id_t sender_id; mux_t mux; - }__attribute__((__packed__)); + } +#ifndef NOPACKED + __attribute__((__packed__)) +#endif +; struct HeaderStruct* header_; u_int8_t * payload_; diff --git a/src/keyDerivation.h b/src/keyDerivation.h index 0f41895..9e8c7b5 100644 --- a/src/keyDerivation.h +++ b/src/keyDerivation.h @@ -37,7 +37,9 @@ #include "threadUtils.hpp" #include "syncBuffer.h" +#ifndef NOCRYPT #include +#endif #include #include diff --git a/src/threadUtils.hpp b/src/threadUtils.hpp index 25afebd..960e757 100644 --- a/src/threadUtils.hpp +++ b/src/threadUtils.hpp @@ -30,6 +30,7 @@ */ #include #include +#include "datatypes.h" #ifndef __THREADUTILS__ #define __THREADUTILS__ typedef boost::mutex::scoped_lock Lock; -- cgit v1.2.3