[For those cc'ed, the thread's at .] On 2023-08-09 07:29, Bruno Haible wrote: > And on Alpine Linux, while /var/run/utmp is empty, its time stamp is > essentially the boot time. > > The approach used by Emacs, namely to look at the time stamp of > /var/run/random-seed, is therefore essentially one of the best approaches. > It just needs to also look at /var/lib/systemd/random-seed and - on Alpine > Linux - /var/run/utmp . Thanks for looking into this. Clearly Emacs had some catching up to do, since it was using a location for the random-seed file that current GNU/Linux distros no longer use. To try to fix this I installed the attached patch to Emacs master on Savannah. This patch does not address the problem for Alpine, nor I suspect for Android. I suppose Alpine could use the timestamp of /var/run/utmp (or is that /run/utmp?) but I don't know how 'configure' would reliably detect it's being built or cross-built for Alpine. I'll cc this to Natanael Copa, who does the Alpine ports for Emacs, to see whether he can give advice. Also, I don't know how Android records boot time so I'll cc this to Po Lu, the main developer for Emacs on Android.