blob: 0ababef0fcfef335de8cbaaeadee5c895b2470f7 [file] [log] [blame]
Petr Vorel6a9d4b32019-07-17 19:44:46 +02001dnl SPDX-License-Identifier: GPL-2.0-or-later
Stanislav Kholmanskikh2d585022013-12-04 16:16:26 +04002dnl Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved.
Stanislav Kholmanskikh2d585022013-12-04 16:16:26 +04003
Stanislav Kholmanskikh2d585022013-12-04 16:16:26 +04004AC_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])