--- ./src/filelock.c.org	2023-09-04 19:19:14.282110171 +0200
+++ ./src/filelock.c	2023-09-04 19:21:09.469561631 +0200
@@ -62,11 +62,11 @@
 /* A file whose last-modified time is just after the most recent boot.
    Define this to be NULL to disable checking for this file.  */
 #ifndef BOOT_TIME_FILE
-#define BOOT_TIME_FILE "/var/run/random-seed"
+#define BOOT_TIME_FILE "@TERMUX_PREFIX@/var/run/random-seed"
 #endif
 
 #if !defined WTMP_FILE && !defined WINDOWSNT && defined BOOT_TIME
-#define WTMP_FILE "/var/log/wtmp"
+#define WTMP_FILE "@TERMUX_PREFIX@/var/log/wtmp"
 #endif
 
 /* Normally use a symbolic link to represent a lock.
@@ -126,14 +126,14 @@
 static time_t boot_time;
 static bool boot_time_initialized;
 
-#ifdef BOOT_TIME
+#if defined (BOOT_TIME) && !defined(__ANDROID__)
 static void get_boot_time_1 (const char *, bool);
 #endif
 
 static time_t
 get_boot_time (void)
 {
-#if defined (BOOT_TIME)
+#if defined (BOOT_TIME) && !defined(__ANDROID__)
   int counter;
 #endif
 
@@ -169,7 +169,7 @@
 	}
     }
 
-#if defined (BOOT_TIME)
+#if defined (BOOT_TIME) && !defined(__ANDROID__)
   /* The utmp routines maintain static state.  Don't touch that state
      if we are going to dump, since it might not survive dumping.  */
   if (will_dump_p ())
@@ -228,7 +228,7 @@
 #endif
 }
 
-#ifdef BOOT_TIME
+#if defined (BOOT_TIME) && !defined(__ANDROID__)
 /* Try to get the boot time from wtmp file FILENAME.
    This succeeds if that file contains a reboot record.
 
