]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme: fix fatal error for sys/random.h
authorSteven Seungcheol Lee <sc108.lee@samsung.com>
Mon, 22 Nov 2021 08:34:58 +0000 (17:34 +0900)
committerDaniel Wagner <dwagner@suse.de>
Fri, 10 Dec 2021 13:55:47 +0000 (14:55 +0100)
commit5f6ccd5200b66235f82f76dae42abe731acf9ba3
tree9c963f11d864b79babdf55cb3b9d42eccfd173ad
parentba5a8223e366f07a110e42d463eae4309c48d265
nvme: fix fatal error for sys/random.h

fatal error: sys/random.h: No such file or directory
sys/random.h supported from glibc version 2.25
so add header file existence check
if there is no sys/random.h, try to read /dev/urandom or /dev/random

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
[dwagner: cache errno value, close will overwrite it]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
ccan/tools/configurator/configurator.c
meson.build
nvme.c