5 dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
6 dnl in time.h or sys/time.h.
8 AC_DEFUN([jm_CHECK_TYPE_STRUCT_TIMESPEC],
10 AC_REQUIRE([AC_HEADER_TIME])
11 AC_CACHE_CHECK([for struct timespec], fu_cv_sys_struct_timespec,
14 # if TIME_WITH_SYS_TIME
15 # include <sys/time.h>
19 # include <sys/time.h>
25 [static struct timespec x; x.tv_sec = x.tv_nsec;],
26 fu_cv_sys_struct_timespec=yes,
27 fu_cv_sys_struct_timespec=no)
30 if test $fu_cv_sys_struct_timespec = yes; then
31 AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
32 [Define if struct timespec is declared in <time.h>. ])