Re: [PATCH 1/6] UML - Deal with host time going backwards

From: Nix
Date: Thu Jun 05 2008 - 17:42:56 EST


On 5 Jun 2008, Jeff Dike uttered the following:

> On Thu, Jun 05, 2008 at 07:14:30PM +0100, Nix wrote:
>> It comes with glibc, and even ls uses it (for clock_gettime(), to
>> determine what format to use for date display).
>>
>> I'd say using it is about as safe as can be.
>
> Without adding -lrt to the link line here (F7), I get

Yes, you'll definitely *need* -lrt for clock_*().

> arch/um/os-Linux/built-in.o: In function `nsecs':
> /home/jdike/linux/2.6/linux-2.6.22/arch/um/os-Linux/time.c:84: undefined reference to `clock_gettime'
> collect2: ld returned 1 exit status
>
> A little odd for a system call...

I think it's in there because it's part of the POSIX realtime
extensions, so you should have to, as it were, assent to using something
that's not as portable as just using libc. It makes more sense than
libm, anyway.

(It's completely moot for UML of course :) )

--
`If you are having a "ua luea luea le ua le" kind of day, I can only
assume that you are doing no work due [to] incapacitating nausea caused
by numerous lazy demons.' --- Frossie
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/