From 673ae0e3c9cefd693ef82f19a6761e147fc6de93 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 17 Feb 2018 05:22:56 +0000 Subject: [PATCH] configure.ac: check clockid_t with necessary headers git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.ac | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 19b4197116..9d5bd08363 100644 --- a/configure.ac +++ b/configure.ac @@ -1166,7 +1166,12 @@ RUBY_REPLACE_TYPE(rlim_t, [int long "long long"], RLIM, [ @%:@include ]) RUBY_REPLACE_TYPE(off_t, [], OFFT) -RUBY_REPLACE_TYPE(clockid_t, [], CLOCKID) +RUBY_REPLACE_TYPE(clockid_t, [], CLOCKID, [@%:@ifdef HAVE_TIME_H +@%:@ include +@%:@endif +@%:@ifdef HAVE_SYS_TIME_H +@%:@ include +@%:@endif]) AC_CACHE_CHECK(for prototypes, rb_cv_have_prototypes, [AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);], @@ -1540,13 +1545,6 @@ AC_CHECK_TYPES([struct timezone], [], [], [@%:@ifdef HAVE_TIME_H @%:@ include @%:@endif]) -AC_CHECK_TYPES([clockid_t], [], [], [@%:@ifdef HAVE_TIME_H -@%:@ include -@%:@endif -@%:@ifdef HAVE_SYS_TIME_H -@%:@ include -@%:@endif]) - AC_CACHE_VAL([rb_cv_large_fd_select], [AC_CHECK_TYPE(fd_mask, [rb_cv_large_fd_select=yes], [rb_cv_large_fd_select=no], [AC_INCLUDES_DEFAULT([]) @%:@ifdef HAVE_SYS_SELECT_H