termux-packages/packages/et/src-base-Headers.hpp.patch
2021-01-04 18:34:29 +05:30

31 lines
901 B
Diff

diff --git a/src/base/Headers.hpp b/src/base/Headers.hpp
index 43a1903..405f51e 100644
--- a/src/base/Headers.hpp
+++ b/src/base/Headers.hpp
@@ -85,7 +85,9 @@ inline int close(int fd) { return ::closesocket(fd); }
#include "easylogging++.h"
#include "json.hpp"
#include "sole.hpp"
+#if !defined(__ANDROID__)
#include "ust.hpp"
+#endif
#ifdef WITH_UTEMPTER
#include <utempter.h>
@@ -133,9 +135,15 @@ const int CLIENT_KEEP_ALIVE_DURATION = 5;
// allow enough time.
const int SERVER_KEEP_ALIVE_DURATION = 11;
+#if defined(__ANDROID__)
+#define STFATAL LOG(FATAL) << "No Stack Trace on Android" << endl
+
+#define STERROR LOG(ERROR) << "No Stack Trace on Android" << endl
+#else
#define STFATAL LOG(FATAL) << "Stack Trace: " << endl << ust::generate()
#define STERROR LOG(ERROR) << "Stack Trace: " << endl << ust::generate()
+#endif
#ifdef WIN32
inline string WindowsErrnoToString() {