Skip to content

Commit

Permalink
utils: use /data/local/tmp as temprary dir on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
simpleton committed Nov 14, 2023
1 parent 51d9fbe commit 0ba2636
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,11 @@ namespace {
std::string unpack_kheaders_tar_xz(const struct utsname& utsname)
{
std::error_code ec;
#if defined(__ANDROID__)
std_filesystem::path path_prefix{ "/data/local/tmp" };
#else
std_filesystem::path path_prefix{ "/tmp" };
#endif
std_filesystem::path path_kheaders{ "/sys/kernel/kheaders.tar.xz" };
if (const char* tmpdir = ::getenv("TMPDIR")) {
path_prefix = tmpdir;
Expand Down

0 comments on commit 0ba2636

Please sign in to comment.