summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/anytun.cpp3
-rw-r--r--src/anytun.suobin35840 -> 35840 bytes
-rw-r--r--src/log.cpp17
3 files changed, 5 insertions, 15 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index eeafc6f..b5d7e14 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -451,6 +451,7 @@ int main(int argc, char* argv[])
#ifndef NOSIGNALCONTROLLER
int ret = sig.run();
+ return ret;
#else
receiver(&p);
#endif
@@ -479,8 +480,6 @@ int main(int argc, char* argv[])
if(connTo)
delete connTo;
*/
-
- return ret;
}
catch(std::runtime_error& e)
{
diff --git a/src/anytun.suo b/src/anytun.suo
index 9468834..0099b24 100644
--- a/src/anytun.suo
+++ b/src/anytun.suo
Binary files differ
diff --git a/src/log.cpp b/src/log.cpp
index ccced0b..65496d3 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -31,7 +31,7 @@
#include <iostream>
#include <string>
-
+#include <boost/system/system_error.hpp>
#include "log.h"
#include "threadUtils.hpp"
@@ -53,18 +53,9 @@ std::ostream& operator<<(std::ostream& stream, LogGpgError const& value)
#endif
std::ostream& operator<<(std::ostream& stream, LogErrno const& value)
{
- char buf[STERROR_TEXT_MAX];
- buf[0] = 0;
- char* errStr;
-// this really sucks, g++ seems to unconditionally define _GNU_SOURCE
-// and undefining it breaks the build...
-#ifdef _GNU_SOURCE
- errStr = strerror_r(value.err_, buf, STERROR_TEXT_MAX);
-#else
- strerror_r(value.err_, buf, STERROR_TEXT_MAX);
- errStr = buf;
-#endif
- return stream << errStr;
+// boost::system::system_error err(boost::system::error_code(value.err_,boost::system::get_system_category()));
+ boost::system::system_error err(boost::system::error_code(value.err_,boost::system::get_posix_category()));
+ return stream << err.what();
}
LogStringBuilder::LogStringBuilder(LogStringBuilder const& src) : log(src.log), prio(src.prio)