projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ada8304
)
Fix Windows build: define rand_r()
author
Bruce Cran
<bruce.cran@gmail.com>
Fri, 22 Jan 2016 17:54:47 +0000
(10:54 -0700)
committer
Jens Axboe
<axboe@fb.com>
Fri, 22 Jan 2016 22:24:58 +0000
(15:24 -0700)
os/os-windows.h
patch
|
blob
|
blame
|
history
diff --git
a/os/os-windows.h
b/os/os-windows.h
index 159c086abaeb0182129181dd6a8bebe81ab0b402..d0495316b6e39c19772c5d4aad3252ad038ca382 100644
(file)
--- a/
os/os-windows.h
+++ b/
os/os-windows.h
@@
-20,6
+20,11
@@
#include "windows/posix.h"
#include "windows/posix.h"
+/* Cygwin doesn't define rand_r if C99 or newer is being used */
+#if defined(WIN32) && !defined(rand_r)
+int rand_r(unsigned *);
+#endif
+
#ifndef PTHREAD_STACK_MIN
#define PTHREAD_STACK_MIN 65535
#endif
#ifndef PTHREAD_STACK_MIN
#define PTHREAD_STACK_MIN 65535
#endif