Joseph Jones liked your message with Boxer.


On December 11, 2015 at 00:48:34 MST, Eric Wong <normalperson@yhbt.net> wrote:
nobu@ruby-lang.org wrote:
> New Revision: 53034
>
> http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53034
>
> Log:
> test_io.rb: fix IO#advise on aarch64-linux
>
> * test/ruby/test_io.rb (test_advise, test_advise_pipe): fadvise on
> aarch64-linux returns ESYS.

How about we hide ENOSYS from the user?

IO#advise is already a no-op on systems where posix_fadvise
is non-existent at build time.

--- a/io.c
+++ b/io.c
@@ -8586,7 +8586,7 @@ do_io_advise(rb_io_t *fptr, VALUE advice, off_t offset, off_t len)
ias.len = len;

rv = (int)rb_thread_io_blocking_region(io_advise_internal, &ias, fptr->fd);
- if (rv) {
+ if (rv && rv != ENOSYS) {
/* posix_fadvise(2) doesn't set errno. On success it returns 0; otherwise
it returns the error code. */
VALUE message = rb_sprintf("%"PRIsVALUE" "