summaryrefslogtreecommitdiff
path: root/ext/pathname/pathname.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pathname/pathname.c')
-rw-r--r--ext/pathname/pathname.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index 4fe8859353..5987ccf462 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -155,11 +155,15 @@ path_cmp(VALUE self, VALUE other)
return INT2FIX(0);
}
+#ifndef ST2FIX
+#define ST2FIX(h) LONG2FIX((long)(h))
+#endif
+
/* :nodoc: */
static VALUE
path_hash(VALUE self)
{
- return INT2FIX(rb_str_hash(get_strpath(self)));
+ return ST2FIX(rb_str_hash(get_strpath(self)));
}
/*