Skip to content

Commit c34a87b

Browse files
petrhosekldionne
authored andcommitted
[libcxx] Use lgamma rather than lgamma_r with LLVM libc
lgamma_r is currently only available on GPU targets.
1 parent 5366bf5 commit c34a87b

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)