From 787730659da6ea1af8378f9dfca1de5ad66c82be Mon Sep 17 00:00:00 2001 From: walter <walter> Date: Fri, 25 Apr 2008 14:01:16 +0000 Subject: [PATCH] b=13539 i=adilger i=rread add linux/random.h to AC_CHECK_HEADERS add #if defined(HAVE_LINUX_RANDOM_H) to lustre/lvfs/prng.c --- lustre/autoconf/lustre-core.m4 | 3 +++ lustre/lvfs/prng.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 7a628c0655..02c3545532 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1779,6 +1779,9 @@ AC_CHECK_FUNCS([inet_ntoa]) # libsysio/src/readlink.c LC_READLINK_SSIZE_T +# lvfs/prng.c +AC_CHECK_HEADERS([linux/random.h]) + # utils/llverfs.c AC_CHECK_HEADERS([ext2fs/ext2fs.h]) diff --git a/lustre/lvfs/prng.c b/lustre/lvfs/prng.c index b067338680..5da435e1ad 100644 --- a/lustre/lvfs/prng.c +++ b/lustre/lvfs/prng.c @@ -18,7 +18,9 @@ #define get_random_bytes(val, size) (*val) = 0 #endif #include <obd_class.h> +#if defined(HAVE_LINUX_RANDOM_H) #include <linux/random.h> +#endif /* From: George Marsaglia <geo@stat.fsu.edu> -- GitLab