From: Jens Axboe Date: Fri, 16 Sep 2016 16:08:15 +0000 (-0600) Subject: configure: harden clockid_t test X-Git-Tag: fio-2.14~1 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=a214d131483c58ab9f1456edaafc1eb8caa8711c 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 --- 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