Skip to content
Permalink
Browse files
Unreviewed libpas build fix for PlayStation.
https://bugs.webkit.org/show_bug.cgi?id=239834

* libpas/src/libpas/pas_random.h:
(pas_get_random):
Temporarily disable path on PlayStation.

Canonical link: https://commits.webkit.org/250069@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rkirsling committed Apr 28, 2022
1 parent 35897b1 commit 05525a74d4ef2d19f84efc193f104730713958d5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
@@ -1,3 +1,12 @@
2022-04-27 Ross Kirsling <rkirsling@gmail.com>

Unreviewed libpas build fix for PlayStation.
https://bugs.webkit.org/show_bug.cgi?id=239834

* libpas/src/libpas/pas_random.h:
(pas_get_random):
Temporarily disable path on PlayStation.

2022-04-25 Brandon Stewart <brandonstewart@apple.com>

[libpas] Implement secure random numbers
@@ -72,12 +72,12 @@ static inline unsigned pas_get_random(pas_random_kind kind, unsigned upper_bound
case pas_secure_random:
/* Secure random is only supported on Darwin and FreeBSD at the moment due to arc4random being built into the
stdlib. Fall back to fast behavior on other operating systems. */
#if PAS_OS(DARWIN) || PAS_OS(FREEBSD)
#if PAS_OS(DARWIN) || (PAS_OS(FREEBSD) && !PAS_PLATFORM(PLAYSTATION))
rand_value = arc4random_uniform(upper_bound);
#else
#else
pas_fast_random_state = pas_xorshift32(pas_fast_random_state);
rand_value = pas_fast_random_state % upper_bound;
#endif
#endif

break;
}

0 comments on commit 05525a7

Please sign in to comment.