aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--io.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 581803ad32..42d1001707 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jan 13 00:00:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (rb_f_syscall): Some syscall return unsigned or pointer value.
+ Therefore we should only check the result is -1 or not. [ruby-core:34062]
+
Wed Jan 12 23:55:48 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* io.c (rb_f_syscall): Add 64bit Linux support. Some syscall takes
diff --git a/io.c b/io.c
index f8aa6dd3f7..2fcc46b139 100644
--- a/io.c
+++ b/io.c
@@ -7931,7 +7931,8 @@ rb_f_syscall(int argc, VALUE *argv)
#endif
}
- if (retval < 0) rb_sys_fail(0);
+ if (retval == -1)
+ rb_sys_fail(0);
return RETVAL2NUM(retval);
#undef SYSCALL
#undef NUM2SYSCALLID