.apk builds. untested

This commit is contained in:
anon5 2016-06-14 08:52:17 +08:00 committed by egp
parent 28c2ca8bf8
commit 58b058ab3a
15 changed files with 314 additions and 10 deletions

View file

@ -74,9 +74,11 @@ namespace i2p
}
// point std{in,out,err} descriptors to /dev/null
stdin = freopen("/dev/null", "r", stdin);
#ifndef ANDROID
stdin = freopen("/dev/null", "r", stdin);
stdout = freopen("/dev/null", "w", stdout);
stderr = freopen("/dev/null", "w", stderr);
#endif
}
// Pidfile
@ -92,7 +94,12 @@ namespace i2p
LogPrint(eLogError, "Daemon: could not create pid file ", pidfile, ": ", strerror(errno));
return false;
}
#ifndef ANDROID
if (lockf(pidFH, F_TLOCK, 0) != 0)
#else
//TODO ANDROID actually need to read man for this, blindly took a solution from <https://forum.qt.io/topic/27872/qtjsondb-build-failed-for-android/2>. -anon5
if (fcntl(pidFH, 1, 0) < 0)
#endif
{
LogPrint(eLogError, "Daemon: could not lock pid file ", pidfile, ": ", strerror(errno));
return false;