coreutils/date.c with FEATURE_DATE_NANO=y broken?

Dan Fandrich dan at coneharvesters.com
Fri Jun 18 04:09:21 UTC 2010


On Fri, Jun 18, 2010 at 02:55:27AM +0200, Denys Vlasenko wrote:
> -		clock_gettime(CLOCK_REALTIME, &ts);
> +		/* libc has incredibly messy way of doing this,
> +		 * typically requiring -lrt. We just skip all this mess */
> +		syscall(__NR_clock_gettime, CLOCK_REALTIME, &ts);

This patch works for me, portability concerns notwithstanding. It shouldn't
be a big deal to have the build system test for -lrt in exactly the same
way as as -lm. Doing syscalls directly makes me nervous.

>>> Dan


More information about the busybox mailing list