diff options
author | Eugene Leviant <evgeny.leviant@gmail.com> | 2016-08-26 08:14:54 +0000 |
---|---|---|
committer | Eugene Leviant <evgeny.leviant@gmail.com> | 2016-08-26 08:14:54 +0000 |
commit | ea877d40b45ae3f77ceaa517ee8f878be45543bc (patch) | |
tree | d1d3ab2118198df0212c48e8203bf9342a21ec7a /llvm/lib/Support/Unix/Unix.h | |
parent | 8f27f511922b5fe9d3e8d2a22a04fc0d3375b6fe (diff) | |
download | bcm5719-llvm-ea877d40b45ae3f77ceaa517ee8f878be45543bc.tar.gz bcm5719-llvm-ea877d40b45ae3f77ceaa517ee8f878be45543bc.zip |
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
Diffstat (limited to 'llvm/lib/Support/Unix/Unix.h')
-rw-r--r-- | llvm/lib/Support/Unix/Unix.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Unix.h b/llvm/lib/Support/Unix/Unix.h index 871e612f6c1..97e9cf86d78 100644 --- a/llvm/lib/Support/Unix/Unix.h +++ b/llvm/lib/Support/Unix/Unix.h @@ -48,6 +48,10 @@ # include <dlfcn.h> #endif +#ifdef HAVE_FCNTL_H +# include <fcntl.h> +#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. |