summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/complex.c b/complex.c
index a21249681f..4be8099ed6 100644
--- a/complex.c
+++ b/complex.c
@@ -1173,8 +1173,9 @@ nucomp_eql_p(VALUE self, VALUE other)
inline static VALUE
f_signbit(VALUE x)
{
-#if defined(HAVE_SIGNBIT) && defined(__GNUC__) && defined(__sun__)
- extern int signbit(double x);
+#if defined(HAVE_SIGNBIT) && defined(__GNUC__) && defined(__sun__) && \
+ !defined(signbit)
+ extern int signbit(double);
#endif
switch (TYPE(x)) {
case T_FLOAT: {