[OpenWrt-Devel] [PATCH] netifd: use the 64-bit version of clock_gettime
Rosen Penev
rosenp at gmail.com
Sun Mar 22 17:21:45 EDT 2020
On Sun, Mar 22, 2020 at 7:35 AM Petr Štetiar <ynezz at true.cz> wrote:
>
> Hans Dedecker <dedeckeh at gmail.com> [2020-03-22 09:39:33]:
>
> > > - if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, &ts) == 0)
> > > + if (syscall(__NR_clock_gettime64, CLOCK_MONOTONIC, &ts) == 0)
> > > return ts.tv_sec;
> > This breaks compilation on glibc
> >
> > /home/dedeckeh/WDR4300_glibc_staging/build_dir/target-mips_24kc_glibc/netifd-2020-02-05-dbdef938/system-linux.c:2424:14:
> > error: '__NR_clock_gettime64' undeclared (first use in this function);
> > did you mean 'SYS_clock_gettime'?
> > if (syscall(__NR_clock_gettime64, CLOCK_MONOTONIC, &ts) == 0)
> > ^~~~~~~~~~~~~~~~~~~~
> > SYS_clock_gettime
>
> This is expected as that glibc version is quite old and should be updated.
My patch keeps the syscall because of a comment in busybox or procd or
somewhere saying that it avoids a dependency on librt.
librt is part of libc in both musl and uClibc-ng, but not glibc.
>
> -- ynezz
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list