projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
25f8227
)
configure: harden clockid_t test
author
Jens Axboe
<axboe@fb.com>
Fri, 16 Sep 2016 16:08:15 +0000
(10:08 -0600)
committer
Jens Axboe
<axboe@fb.com>
Fri, 16 Sep 2016 16:08:15 +0000
(10:08 -0600)
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 <axboe@fb.com>
configure
patch
|
blob
|
blame
|
history
diff --git
a/configure
b/configure
index 14ec47e9743399707c027db282d612a0daacbc9b..a24e3eff7fd4985ba66fe4a8a0aedcc6d3f14088 100755
(executable)
--- a/
configure
+++ b/
configure
@@
-798,10
+798,12
@@
echo "CLOCK_MONOTONIC_PRECISE $clock_monotonic_precise"
clockid_t="no"
cat > $TMPC << EOF
#include <stdio.h>
+#include <string.h>
#include <time.h>
int main(int argc, char **argv)
{
- clockid_t cid = 0;
+ clockid_t cid;
+ memset(&cid, 0, sizeof(cid));
return clock_gettime(cid, NULL);
}
EOF