patch modified from 'misc-syscalls' by Dan Drown: http://dan.drown.org/android/src/busybox/
Signed-off-by: Tias Guns <[email protected]> --- libbb/Kbuild.src | 2 ++ libbb/stime.c | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 libbb/stime.c diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src index 98031f4..1435145 100644 --- a/libbb/Kbuild.src +++ b/libbb/Kbuild.src @@ -190,3 +190,5 @@ lib-$(CONFIG_FEATURE_FIND_REGEX) += xregcomp.o # for android-busybox-ndk lib-y += getsid.o +lib-$(CONFIG_DATE) += stime.o +lib-$(CONFIG_RDATE) += stime.o diff --git a/libbb/stime.c b/libbb/stime.c new file mode 100644 index 0000000..04a4e8b --- /dev/null +++ b/libbb/stime.c @@ -0,0 +1,10 @@ +#include <time.h> +#include <sys/time.h> + +int stime(const time_t *t) { + struct timeval tv; + + tv.tv_sec = *t; + tv.tv_usec = 0; + return settimeofday(&tv, NULL); +} -- 1.7.10 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
