Re: [PATCH] testptp: Fix compile with musl libc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 14, 2021 at 07:00:39PM +0100, Hauke Mehrtens wrote:
> glibc 2.14 was released 1. June 2011 and musl libc also supports this
> function since version v0.9.7 28. October 2012. I would just assume that the
> libc has this function.

Considering that somebody wanted it to work with a GNU libc prior to
2011, why would we not assume that somebody will eventually want it to
work with a musl libc prior to 2012?

> musl also does some special handling, probably for the 64 bit time handling,
> in this function:
> https://git.musl-libc.org/cgit/musl/tree/src/linux/clock_adjtime.c#n37
> I am not sure if this will also work fine with the compat function.

I've stared at commit
https://git.musl-libc.org/cgit/musl/commit/src/linux/clock_adjtime.c?id=2b4fd6f75b4fa66d28cddcf165ad48e8fda486d1
which added the conversion logic between struct ktimex64/struct ktimex
and struct timex, and sadly I don't understand what is the point of
wrapping the clock_adjtime function around the SYS_clock_adjtime64
syscall, when the struct timex::time member will still not be Y2038 safe
on 32-bit systems...

That being said, I didn't know that musl libc provides any wrappers
around these syscalls.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux