arith.c: use __div64_32 from the library
This change is needed to avoid requiring libgcc in freestanding
environments.
The div64 function I copied from the kernel only works with unsigned
numbers, but arth.h had them signed. I'm not sure at this point
whether PTP uses negative nanoseconds in this conversion, so I added a
diagnostic message. If it triggers, I can look for a solution, but I
suspect it doesn't happen.
Please note that a 64-bit arch may define the function as an inline
that does the calculation with C operators, but currently
arch-gnu-linux is used for both 32-bit and 64-bit hosts.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Showing
Please
register
or
sign in
to comment