SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
24
net/tinyfugue/patches/patch-src_port_h
Normal file
24
net/tinyfugue/patches/patch-src_port_h
Normal file
|
@ -0,0 +1,24 @@
|
|||
--- src/port.h.orig Sun Aug 11 22:56:24 2013
|
||||
+++ src/port.h Sun Aug 11 23:00:53 2013
|
||||
@@ -246,7 +246,11 @@ extern char *sys_errlist[];
|
||||
* not agree with RAND_MAX. We must not link with -lucb.
|
||||
*/
|
||||
|
||||
-#ifdef HAVE_srandom
|
||||
+#if defined(HAVE_arc4random) && defined(HAVE_arc4random_uniform)
|
||||
+# define RAND() arc4random()
|
||||
+# define SRAND(seed) /* empty */
|
||||
+# define RRAND(lo,hi) (arc4random_uniform((hi)-(lo)) + (lo))
|
||||
+#elif defined(HAVE_srandom)
|
||||
# include <math.h>
|
||||
# define RAND() (int)random()
|
||||
# define SRAND(seed) srandom(seed)
|
||||
@@ -262,7 +266,7 @@ extern char *sys_errlist[];
|
||||
# define RRAND(lo,hi) (RAND() % ((hi)-(lo)+1) + (lo))
|
||||
# endif
|
||||
# else
|
||||
- error "Don't have srand() or srandom()."
|
||||
+# error "Don't have srand() or srandom()."
|
||||
# endif
|
||||
#endif
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue