Skip to content

Commit d2218d9

Browse files
committed
Attempt to fix build breakage due to lgammaf_r having two leading underscores on mingw.
1 parent c2c497f commit d2218d9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/libcore/cmath.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,16 @@ native mod c_float {
122122
y: c_float) -> c_float;
123123
#[link_name="hypotf"] pure fn hypot(x: c_float, y: c_float) -> c_float;
124124
#[link_name="ldexpf"] pure fn ldexp(x: c_float, n: c_int) -> c_float;
125+
126+
#[cfg(target_os="linux")]
127+
#[cfg(target_os="macos")]
125128
#[link_name="lgammaf_r"] pure fn lgamma(n: c_float,
126129
&sign: c_int) -> c_float;
130+
131+
#[cfg(target_os="win32")]
132+
#[link_name="__lgammaf_r"] pure fn lgamma(n: c_float,
133+
&sign: c_int) -> c_float;
134+
127135
#[link_name="logf"] pure fn ln(n: c_float) -> c_float;
128136
#[link_name="logbf"] pure fn log_radix(n: c_float) -> c_float;
129137
#[link_name="log1pf"] pure fn ln1p(n: c_float) -> c_float;

0 commit comments

Comments
 (0)