summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-07-27 23:27:07 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-07-27 23:27:07 +0200
commit75ba6fc573de5d0fec616dbbc35d01b1cb3ccdbf (patch)
treeb7198f266b66d7600f8cd30bf77644843c61b4a0
parent8098024c35f48a69ef88929ea370c0512bf235b0 (diff)
downloadgnutls-75ba6fc573de5d0fec616dbbc35d01b1cb3ccdbf.tar.gz
rnd-linux: use better define check for linux systems
-rw-r--r--lib/nettle/rnd-linux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/nettle/rnd-linux.c b/lib/nettle/rnd-linux.c
index a0a86d7826..121acfeaeb 100644
--- a/lib/nettle/rnd-linux.c
+++ b/lib/nettle/rnd-linux.c
@@ -50,7 +50,7 @@ static int _gnutls_urandom_fd = -1;
static ino_t _gnutls_urandom_fd_ino = 0;
static dev_t _gnutls_urandom_fd_rdev = 0;
-#if defined(__linux)
+#if defined(__linux__)
# ifdef HAVE_LINUX_GETRANDOM
# include <linux/random.h>
# else
@@ -107,7 +107,7 @@ static int _rnd_get_system_entropy_getrandom(void* _rnd, size_t size)
return 0;
}
-#else
+#else /* not linux */
# define have_getrandom() 0
#endif
@@ -162,7 +162,7 @@ int _rnd_system_entropy_init(void)
int old;
struct stat st;
-#if defined(__linux)
+#if defined(__linux__)
/* Enable getrandom() usage if available */
if (have_getrandom()) {
_rnd_get_system_entropy = _rnd_get_system_entropy_getrandom;