summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2009-11-04 22:28:49 +0000
committerOthmar Gsenger <otti@anytun.org>2009-11-04 22:28:49 +0000
commit5391b104f85cfb627a7b9dad575bdd7afead4063 (patch)
tree6f69137c2d87192e59bca6a4fcc357ee25aed952 /src
parentfixed copyright (diff)
include cstring for memcopy
fixes build error on newer systems builds with boost 1.40 now
Diffstat (limited to 'src')
-rw-r--r--src/keyDerivation.cpp7
-rw-r--r--src/seqWindow.cpp2
-rw-r--r--src/sysExec.cpp1
3 files changed, 6 insertions, 4 deletions
diff --git a/src/keyDerivation.cpp b/src/keyDerivation.cpp
index 61b662d..6b102b9 100644
--- a/src/keyDerivation.cpp
+++ b/src/keyDerivation.cpp
@@ -42,6 +42,7 @@
#include <iostream>
#include <sstream>
#include <string>
+#include <cstring>
#ifndef NO_CRYPT
#ifndef NO_PASSPHRASE
@@ -86,7 +87,7 @@ void KeyDerivation::calcMasterKey(std::string passphrase, u_int16_t length)
#endif
master_key_.setLength(length);
- memcpy(master_key_.getBuf(), &digest.getBuf()[digest.getLength() - master_key_.getLength()], master_key_.getLength());
+ std::memcpy(master_key_.getBuf(), &digest.getBuf()[digest.getLength() - master_key_.getLength()], master_key_.getLength());
}
void KeyDerivation::calcMasterSalt(std::string passphrase, u_int16_t length)
@@ -115,7 +116,7 @@ void KeyDerivation::calcMasterSalt(std::string passphrase, u_int16_t length)
#endif
master_salt_.setLength(length);
- memcpy(master_salt_.getBuf(), &digest.getBuf()[digest.getLength() - master_salt_.getLength()], master_salt_.getLength());
+ std::memcpy(master_salt_.getBuf(), &digest.getBuf()[digest.getLength() - master_salt_.getLength()], master_salt_.getLength());
}
#endif
#endif
@@ -288,7 +289,7 @@ bool AesIcmKeyDerivation::calcCtr(kd_dir_t dir, satp_prf_label_t label, seq_nr_t
cLog.msg(Log::PRIO_ERROR) << "KeyDerivation::calcCtr: salt lengths don't match";
return false;
}
- memcpy(ctr_[dir].salt_.buf_, master_salt_.getBuf(), SALT_LENGTH);
+ std::memcpy(ctr_[dir].salt_.buf_, master_salt_.getBuf(), SALT_LENGTH);
ctr_[dir].salt_.zero_ = 0;
ctr_[dir].params_.label_ ^= SATP_PRF_LABEL_T_HTON(convertLabel(dir, label));
ctr_[dir].params_.seq_ ^= SEQ_NR_T_HTON(seq_nr);
diff --git a/src/seqWindow.cpp b/src/seqWindow.cpp
index f7bbc06..359ba63 100644
--- a/src/seqWindow.cpp
+++ b/src/seqWindow.cpp
@@ -32,7 +32,7 @@
#include "threadUtils.hpp"
#include "datatypes.h"
-
+#include <cstring>
#include "seqWindow.h"
SeqWindowElement::SeqWindowElement()
diff --git a/src/sysExec.cpp b/src/sysExec.cpp
index 2580828..49c0cae 100644
--- a/src/sysExec.cpp
+++ b/src/sysExec.cpp
@@ -46,6 +46,7 @@
#include <sys/select.h>
#include <stdlib.h>
#include <string.h>
+#include <cstring>
void anytun_exec(std::string const& script)
{