iscsi-perf: Use gettimeofday if clock_gettime is unavailable
clock_gettime doesn't existing on OS X (http://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x ) so add an autoconf test to check if the platform has it and fall back on gettimeofday if not. Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
This commit is contained in:
@@ -128,6 +128,9 @@ AC_CHECK_MEMBER([struct CU_SuiteInfo.pSetUpFunc],
|
||||
#include <CUnit/TestDB.h>
|
||||
]])
|
||||
|
||||
AC_SEARCH_LIBS(clock_gettime, rt, [
|
||||
AC_DEFINE([HAVE_CLOCK_GETTIME],1,[Define if clock_gettime is available])])
|
||||
|
||||
|
||||
AC_CONFIG_FILES([Makefile]
|
||||
[lib/Makefile]
|
||||
|
||||
Reference in New Issue
Block a user