Great job, Christian!

I was curios by how many changes were nedded to port Busybox and was
reading the patch file you linked.

Only one note...

> - date.c: Use clock_gettime() if syscall.h is not available.

>From the patch linked, this the one for date:

> --- origsrc/busybox-1.23.2/coreutils/date.c    2015-03-23 04:07:18.000000000 
> +0100
> +++ src/busybox-1.23.2/coreutils/date.c    2015-06-25 21:16:30.764288700 +0200
> @@ -138,7 +138,7 @@
>  //usage:       "Wed Apr 12 18:52:41 MDT 2000\n"
>
>  #include "libbb.h"
> -#if ENABLE_FEATURE_DATE_NANO
> +#if ENABLE_FEATURE_DATE_NANO && defined(HAVE_SYS_SYSCALL_H)
>  # include <sys/syscall.h>
>  #endif
>
> @@ -260,10 +260,13 @@ int date_main(int argc UNUSED_PARAM, cha
>  #endif
>      } else {
>  #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
> +# else
> +        clock_gettime(CLOCK_REALTIME, &ts);
> +# endif
>          time(&ts.tv_sec);
>  #endif
>      }

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?

Cheers,

Xabier Oneca_,,_
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to