From: Timo Sirainen Date: Fri, 16 Feb 2018 12:33:33 +0000 (+0200) Subject: lib: Fix compiler warning when arc4random_buf() is used for random_fill() X-Git-Tag: 2.3.9~2290 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=400d8aabe7366b6e28b5a341258923f2676efedb;p=thirdparty%2Fdovecot%2Fcore.git lib: Fix compiler warning when arc4random_buf() is used for random_fill() --- diff --git a/src/lib/randgen.c b/src/lib/randgen.c index 6b2f3ed20f..6289a15cc0 100644 --- a/src/lib/randgen.c +++ b/src/lib/randgen.c @@ -60,6 +60,7 @@ static bool getrandom_present = FALSE; static int init_refcount = 0; static int urandom_fd = -1; +#if defined(USE_GETRANDOM) || defined(USE_RANDOM_DEV) static void random_open_urandom(void) { urandom_fd = open(DEV_URANDOM_PATH, O_RDONLY); @@ -74,7 +75,6 @@ static void random_open_urandom(void) fd_close_on_exec(urandom_fd, TRUE); } -#if defined(USE_GETRANDOM) || defined(USE_RANDOM_DEV) static inline int random_read(char *buf, size_t size) { ssize_t ret = 0;