@@ -27,6 +27,7 @@ AC_CHECK_FUNCS([ \
renameat \
renameat2 \
splice \
+ stime \
syncfs \
sync_file_range \
tee \
@@ -8,6 +8,7 @@
#define STIME_VAR__
#include <sys/time.h>
+#include "config.h"
#include "lapi/syscalls.h"
#define TEST_VARIANTS 3
@@ -16,11 +17,12 @@ static int do_stime(time_t *ntime)
{
switch (tst_variant) {
case 0:
-#ifdef __ANDROID__
- tst_brk(TCONF, "libc stime() is not implemented on Android");
+#ifndef HAVE_STIME
+ tst_brk(TCONF, "libc stime() is not implemented");
#else
return stime(ntime);
#endif
+ break;
case 1:
return tst_syscall(__NR_stime, ntime);
case 2: {
Don't alway skip libc stime() for Android because bionic(Android libc) may implement it in the future. Also add break to fix potential compiler warnings. Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> --- m4/ltp-libc-funcs.m4 | 1 + testcases/kernel/syscalls/stime/stime_var.h | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-)