Re: boot time on Linux

2023-08-10 Thread Natanael Copa
s 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 > Nat

Re: boot time on Linux

2023-08-10 Thread Natanael Copa
On Thu, 10 Aug 2023 17:38:10 +0800 Po Lu wrote: > Natanael Copa writes: > > > 2) Even if it does exist, there is no guarantee that the timestamp is > > correct. There are machines without RTC (Raspberry PI for example), > > and in this case the time stamp may end up to

Re: [PATCH v2] physmem: use sysinfo on linux for physmem_total

2014-04-19 Thread Natanael Copa
Den 18. apr. 2014 kl. 18:11 skrev Pádraig Brady : > On 04/18/2014 10:16 AM, Natanael Copa wrote: >> * lib/physmem.c (physmem_total): Some systems like musl libc does not >> (yet) support _SC_PHYS_PAGES. Use the linux syscall sysinfo as fallback >> if _SC_PHYS_PAGES

[PATCH v2] physmem: use sysinfo on linux for physmem_total

2014-04-18 Thread Natanael Copa
* lib/physmem.c (physmem_total): Some systems like musl libc does not (yet) support _SC_PHYS_PAGES. Use the linux syscall sysinfo as fallback if _SC_PHYS_PAGES or _SC_PAGESIZE fails. Signed-off-by: Natanael Copa --- Changes since v1: - prefer use _SC_PHYS_PAGES * _SC_PAGESIZE if available and

Re: [PATCH] physmem: use sysinfo on linux for physmem_total

2014-04-18 Thread Natanael Copa
On Thu, 17 Apr 2014 01:26:13 +0100 Pádraig Brady wrote: > On 04/15/2014 03:49 PM, Pádraig Brady wrote: > > On 04/15/2014 03:43 PM, Natanael Copa wrote: > >> * lib/physmem.c (physmem_total): Some systems like musl libc does not > >> (yet) support _SC_PHYS_PAGES. Us

[PATCH] physmem: use sysinfo on linux for physmem_total

2014-04-15 Thread Natanael Copa
* lib/physmem.c (physmem_total): Some systems like musl libc does not (yet) support _SC_PHYS_PAGES. Use the linux syscall sysinfo first and fallback to sysconf with _SC_PHYS_PAGES and _SC_PAGESIZE. Signed-off-by: Natanael Copa --- lib/physmem.c | 13 - m4/physmem.m4 | 2 +- 2 files

physmem_total broken with musl libc

2014-04-15 Thread Natanael Copa
Hi, It seems like physmem_total is broken with musl libc since _SC_PHYS_PAGES is not implemented. Would it be an idea to use sysinfo from sys/sysinfo.h first and then fallback to the current _SC_PHYS_PAGES * _SC_PAGESIZE? Something like: diff --git a/lib/physmem.c b/lib/physmem.c index 7a67fb3