From: Todd C. Miller Date: Thu, 25 Nov 2004 17:23:27 +0000 (+0000) Subject: Correct the test for 2-parameter timespecsub X-Git-Tag: SUDO_1_7_0~782 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ed367de8f3e7813ddbd24bc801bbc5eddde5fa3;p=sudo Correct the test for 2-parameter timespecsub --- diff --git a/configure b/configure index 3d6f02dd0..f9bfca621 100755 --- a/configure +++ b/configure @@ -27820,7 +27820,12 @@ cat >>conftest.$ac_ext <<_ACEOF int main () { -struct timespec ts1, ts2; ts1.tv_sec = 1; ts1.tv_nsec = 0; ts2.tv_sec = 0; ts2.tv_nsec = 0; timespecsub(&ts1, &ts2); +struct timespec ts1, ts2; +ts1.tv_sec = 1; ts1.tv_nsec = 0; ts2.tv_sec = 0; ts2.tv_nsec = 0; +#ifndef timespecsub +#error missing timespecsub +#endif +timespecsub(&ts1, &ts2); ; return 0; } diff --git a/configure.in b/configure.in index 7853b4139..8337bf653 100644 --- a/configure.in +++ b/configure.in @@ -1707,7 +1707,12 @@ if test X"$ac_cv_type_struct_timespec" != X"no"; then AC_CHECK_MEMBER([struct stat.st_mtim], AC_DEFINE(HAVE_ST_MTIM), [AC_CHECK_MEMBER([struct stat.st_mtimespec], AC_DEFINE([HAVE_ST_MTIMESPEC]))]) AC_MSG_CHECKING([for two-parameter timespecsub]) AC_TRY_COMPILE([#include -#include ], [struct timespec ts1, ts2; ts1.tv_sec = 1; ts1.tv_nsec = 0; ts2.tv_sec = 0; ts2.tv_nsec = 0; timespecsub(&ts1, &ts2);], +#include ], [struct timespec ts1, ts2; +ts1.tv_sec = 1; ts1.tv_nsec = 0; ts2.tv_sec = 0; ts2.tv_nsec = 0; +#ifndef timespecsub +#error missing timespecsub +#endif +timespecsub(&ts1, &ts2);], [AC_DEFINE(HAVE_TIMESPECSUB2) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) fi