From ea877d40b45ae3f77ceaa517ee8f878be45543bc Mon Sep 17 00:00:00 2001 From: Eugene Leviant Date: Fri, 26 Aug 2016 08:14:54 +0000 Subject: Implement getRandomBytes() function This function allows getting arbitrary sized block of random bytes. Primary motivation is support for --build-id=uuid in lld. Differential revision: https://reviews.llvm.org/D23671 llvm-svn: 279807 --- llvm/lib/Support/Unix/Unix.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/Support/Unix/Unix.h') diff --git a/llvm/lib/Support/Unix/Unix.h b/llvm/lib/Support/Unix/Unix.h index 871e612..97e9cf8 100644 --- a/llvm/lib/Support/Unix/Unix.h +++ b/llvm/lib/Support/Unix/Unix.h @@ -48,6 +48,10 @@ # include #endif +#ifdef HAVE_FCNTL_H +# include +#endif + /// This function builds an error message into \p ErrMsg using the \p prefix /// string and the Unix error number given by \p errnum. If errnum is -1, the /// default then the value of errno is used. -- cgit v1.1