summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2017-11-16 16:29:36 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2017-11-16 16:33:57 +0100
commite2640ef763e1335d0eec590ceaeaa390428cfd51 (patch)
tree55e21f2a02dba20dc746e68a34d3cc60aab68ded
parente08da9757099af3d275c122c9379d46a037eb309 (diff)
gsm: Use correct include for getrandom
"man getrandom" states sys/random.h is required. Fixes warning below: warning: implicit declaration of function ‘getrandom’; did you mean ‘srandom’? [-Wimplicit-function-declaration] rc = getrandom(out, len, GRND_NONBLOCK); ^~~~~~~~~ Change-Id: I2e73fd018e887893dc5527d6d73644d627eb963a
-rw-r--r--src/gsm/gsm_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c
index 8464090a..5d8c834e 100644
--- a/src/gsm/gsm_utils.c
+++ b/src/gsm/gsm_utils.c
@@ -100,7 +100,7 @@
/* FIXME: this can be removed once we bump glibc requirements to 2.25: */
#if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 25)
-#include <linux/random.h>
+#include <sys/random.h>
#elif HAVE_DECL_SYS_GETRANDOM
#include <sys/syscall.h>
#ifndef GRND_NONBLOCK