1dnl SPDX-License-Identifier: GPL-2.0-or-later
2dnl Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
3
4AC_DEFUN([LTP_CHECK_SYSCALL_UTIMENSAT],[
5	AC_MSG_CHECKING([for utimensat])
6	AC_LINK_IFELSE([AC_LANG_SOURCE([
7#include <stdlib.h>
8#include <sys/stat.h>
9#include <fcntl.h>
10
11int main(void) {
12	long tv_nsec;
13	tv_nsec = UTIME_NOW;
14	tv_nsec = UTIME_OMIT;
15
16	return utimensat(AT_FDCWD, NULL, NULL, 0);
17}])],[has_utimensat="yes"])
18
19if test "x$has_utimensat" = "xyes"; then
20	AC_DEFINE(HAVE_UTIMENSAT, 1, [Define to 1 if you have utimensat(2)])
21	AC_MSG_RESULT(yes)
22else
23	AC_MSG_RESULT(no)
24fi
25])
26