diff options
Diffstat (limited to 'openbsd-compat/bindresvport.c')
-rw-r--r-- | openbsd-compat/bindresvport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c index c0d5bdb5c335..c89f21403445 100644 --- a/openbsd-compat/bindresvport.c +++ b/openbsd-compat/bindresvport.c @@ -89,7 +89,7 @@ bindresvport_sa(int sd, struct sockaddr *sa) port = ntohs(*portp); if (port == 0) - port = (arc4random() % NPORTS) + STARTPORT; + port = arc4random_uniform(NPORTS) + STARTPORT; /* Avoid warning */ error = -1; |