From a214d131483c58ab9f1456edaafc1eb8caa8711c Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 16 Sep 2016 10:08:15 -0600 Subject: [PATCH] configure: harden clockid_t test Don't assume we can assign '0' to a clockid_t type, let's just memset it to be on the safe side. Signed-off-by: Jens Axboe --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 14ec47e9..a24e3eff 100755 --- a/configure +++ b/configure @@ -798,10 +798,12 @@ echo "CLOCK_MONOTONIC_PRECISE $clock_monotonic_precise" clockid_t="no" cat > $TMPC << EOF #include +#include #include int main(int argc, char **argv) { - clockid_t cid = 0; + clockid_t cid; + memset(&cid, 0, sizeof(cid)); return clock_gettime(cid, NULL); } EOF -- 2.25.1