From 217b154a5f65d46064ceb69ce69664105e703a74 Mon Sep 17 00:00:00 2001 From: Stephan Mueller Date: Thu, 3 Aug 2017 17:52:48 +0200 Subject: [PATCH] Do not compile unused functions GCC 7 now rightfully complains about unused functions. Signed-off-by: Stephan Mueller [Upstream commit: https://github.com/smuellerDD/libkcapi/commit/217b154a5f65d46064ceb69ce69664105e703a74] Signed-off-by: Marcin Nowakowski --- apps/kcapi-rng.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/kcapi-rng.c b/apps/kcapi-rng.c index df7decf..e15edf9 100644 --- a/apps/kcapi-rng.c +++ b/apps/kcapi-rng.c @@ -45,6 +45,7 @@ struct kcapi_handle *rng = NULL; unsigned int Verbosity = 0; char *rng_name = NULL; +#ifndef HAVE_GETRANDOM static int read_complete(int fd, uint8_t *buf, uint32_t buflen) { ssize_t ret; @@ -76,6 +77,7 @@ static int read_random(uint8_t *buf, uint32_t buflen) close(fd); return ret; } +#endif static int get_random(uint8_t *buf, uint32_t buflen) {