Previous versions did not have this type, so we defined our own.
As of 10.12 it does seem to, so add a configure test for this.
Signed-off-by: Jens Axboe <axboe@fb.com>
fi
echo "CLOCK_MONOTONIC_PRECISE $clock_monotonic_precise"
fi
echo "CLOCK_MONOTONIC_PRECISE $clock_monotonic_precise"
+##########################################
+# clockid_t probe
+clockid_t="no"
+cat > $TMPC << EOF
+#include <stdio.h>
+#include <time.h>
+int main(int argc, char **argv)
+{
+ clockid_t cid = 0;
+ return clock_gettime(cid, NULL);
+}
+EOF
+if compile_prog "" "$LIBS" "clockid_t"; then
+ clockid_t="yes"
+fi
+echo "clockid_t $clockid_t"
+
##########################################
# gettimeofday() probe
gettimeofday="no"
##########################################
# gettimeofday() probe
gettimeofday="no"
if test "$clock_monotonic_precise" = "yes" ; then
output_sym "CONFIG_CLOCK_MONOTONIC_PRECISE"
fi
if test "$clock_monotonic_precise" = "yes" ; then
output_sym "CONFIG_CLOCK_MONOTONIC_PRECISE"
fi
+if test "$clockid_t" = "yes"; then
+ output_sym "CONFIG_CLOCKID_T"
+fi
if test "$gettimeofday" = "yes" ; then
output_sym "CONFIG_GETTIMEOFDAY"
fi
if test "$gettimeofday" = "yes" ; then
output_sym "CONFIG_GETTIMEOFDAY"
fi
+#ifndef CONFIG_CLOCKID_T
typedef unsigned int clockid_t;
typedef unsigned int clockid_t;
#define FIO_OS_DIRECTIO
static inline int fio_set_odirect(int fd)
#define FIO_OS_DIRECTIO
static inline int fio_set_odirect(int fd)