dines
dines copied to clipboard
Build fails: ‘std::function’ has not been declared
The toolchain is g++ (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
diff --git a/src/utils.cpp b/src/utils.cpp
index ab0a7fa..48a03fa 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -16,6 +16,7 @@
#include <sstream>
#include <string.h>
#include <random>
+#include <tr1/functional>
using namespace std;
@@ -40,7 +41,7 @@ static std::vector<char> charset()
};
// Internal random string generator
-static std::string random_string_int( size_t length, std::function<char(void)> rand_char )
+static std::string random_string_int( size_t length, std::tr1::function<char(void)> rand_char )
{
std::string str(length, 0);
std::generate_n(str.begin(), length, rand_char);
Thanks for the patch :+1: . Can you do a pull request, please?
I just experimented with the framework a little bit. I did not fork the repository. I am not sure if my patch is necessary. I am not using dines at this point and not planning to use it in the near future. I have opted for embedding a simple DNS traffic generator into my code.