Skip to content

Commit 84ce230

Browse files
authored
[libcxx] Use lgamma rather than lgamma_r with LLVM libc (#109556)
`lgamma_r` is currently only available on GPU targets.
1 parent f427004 commit 84ce230

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/__random/binomial_distribution.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ extern "C" double lgamma_r(double, int*);
103103
#endif
104104

105105
inline _LIBCPP_HIDE_FROM_ABI double __libcpp_lgamma(double __d) {
106-
#if defined(_LIBCPP_MSVCRT_LIKE)
106+
#if defined(_LIBCPP_MSVCRT_LIKE) || defined(__LLVM_LIBC__)
107107
return lgamma(__d);
108108
#else
109109
int __sign;

0 commit comments

Comments
 (0)