summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2014-03-05 16:58:21 +0000
committerDavid M. Lee <dlee@digium.com>2014-03-05 16:58:21 +0000
commit38a619af97ccb98cfca702d8ae084926fd42fd39 (patch)
treec79e153e255042a09dae961d4564076d3920d0ef /configure.ac
parentbcb0f94604153879507e351475400076d3901d9a (diff)
Corrected cross-platform stat nanosecond code
When nanosecond time resolution was added for identifying config file changes, it didn't cover all of the myriad of ways that one might obtain nanosecond time resolution off of struct stat. Rather than complicate the #if even further figuring out one system from the next, this patch directly tests for the three struct members I know about today, and #ifdef's accordingly. Review: https://reviewboard.asterisk.org/r/3273/ ........ Merged revisions 409833 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 409834 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409835 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 80fbcf59c..67d264701 100644
--- a/configure.ac
+++ b/configure.ac
@@ -606,6 +606,12 @@ AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE
AC_CHECK_TYPES([ptrdiff_t])
+stat_nsec_found=no
+AC_CHECK_MEMBERS([struct stat.st_mtim, struct stat.st_mtimensec, struct stat.st_mtimespec], [stat_nsec_found=yes], [], [[#include <sys/stat.h>]])
+
+if test "${stat_nsec_found}" != yes; then
+ AC_MSG_WARN(Cannot determine nanosecond field of struct stat)
+fi
# Checks for library functions.
AC_FUNC_CHOWN