Petr Vorel | 6a9d4b3 | 2019-07-17 19:44:46 +0200 | [diff] [blame] | 1 | dnl SPDX-License-Identifier: GPL-2.0-or-later |
Stanislav Kholmanskikh | 2d58502 | 2013-12-04 16:16:26 +0400 | [diff] [blame] | 2 | dnl Copyright (c) 2013 Oracle and/or its affiliates. All Rights Reserved. |
Stanislav Kholmanskikh | 2d58502 | 2013-12-04 16:16:26 +0400 | [diff] [blame] | 3 | |
Stanislav Kholmanskikh | 2d58502 | 2013-12-04 16:16:26 +0400 | [diff] [blame] | 4 | AC_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 | |
| 11 | int 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 | |
| 19 | if 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) |
| 22 | else |
| 23 | AC_MSG_RESULT(no) |
| 24 | fi |
| 25 | ]) |