Hello, >> There, before the change, time() was called when *not* >> ENABLE_FEATURE_DATE_NANO. Now, with your patch it is called if it >> *is*. Is this change intentional? > > > No! I accidentally dropped the #else. Thanks for catching. > > This breaks builds with !ENABLE_FEATURE_DATE_NANO. > > In the ENABLE_FEATURE_DATE_NANO case, the bug is not visible except when > tv_sec increments between clock_gettime() and time() call and the "%N" > format is actually used. > > Correct one: > > #if ENABLE_FEATURE_DATE_NANO > +# ifdef HAVE_SYS_SYSCALL_H > /* libc has incredibly messy way of doing this, > * typically requiring -lrt. We just skip all this mess */ > syscall(__NR_clock_gettime, CLOCK_REALTIME, &ts); > +# else > + clock_gettime(CLOCK_REALTIME, &ts); > +# endif > #else > time(&ts.tv_sec); > #endif
Well, now it is better :) Cheers, Xabier Oneca_,,_ _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
