34 lines
859 B
Diff
34 lines
859 B
Diff
--- a/sdk/src/posix/fs.cpp
|
|
+++ b/sdk/src/posix/fs.cpp
|
|
@@ -30,7 +30,7 @@
|
|
#include "mega/osx/osxutils.h"
|
|
#endif
|
|
|
|
-#ifdef __ANDROID__
|
|
+#if defined __ANDROID__ && !defined __TERMUX__
|
|
#include <jni.h>
|
|
extern JavaVM *MEGAjvm;
|
|
#endif
|
|
@@ -1530,7 +1530,7 @@
|
|
|
|
void PosixFileSystemAccess::statsid(string *id) const
|
|
{
|
|
-#ifdef __ANDROID__
|
|
+#if defined __ANDROID__ && !defined __TERMUX__
|
|
if (!MEGAjvm)
|
|
{
|
|
LOG_err << "No JVM found";
|
|
@@ -1787,10 +1787,10 @@
|
|
uuid_unparse(uuid, uuid_str);
|
|
id->append(uuid_str);
|
|
#else
|
|
- int fd = open("/etc/machine-id", O_RDONLY);
|
|
+ int fd = open("@TERMUX_PREFIX@/etc/machine-id", O_RDONLY);
|
|
if (fd < 0)
|
|
{
|
|
- fd = open("/var/lib/dbus/machine-id", O_RDONLY);
|
|
+ fd = open("@TERMUX_PREFIX@/var/lib/dbus/machine-id", O_RDONLY);
|
|
if (fd < 0)
|
|
{
|
|
return;
|