kumquat-buildroot/package/libkcapi/0002-Do-not-compile-unused-functions.patch

36 lines
1.0 KiB
Diff
Raw Normal View History

From 217b154a5f65d46064ceb69ce69664105e703a74 Mon Sep 17 00:00:00 2001
From: Stephan Mueller <smueller@chronox.de>
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 <smueller@chronox.de>
[Upstream commit: https://github.com/smuellerDD/libkcapi/commit/217b154a5f65d46064ceb69ce69664105e703a74]
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
---
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)
{