Permalink
Browse files

allow fadvise to fail

  • Loading branch information...
ryancdotorg committed Oct 20, 2015
1 parent d6c1c7c commit 5e45cf86fb4f920124967a1cdbceb527a3aafc22
Showing with 2 additions and 1 deletion.
  1. +2 −1 mmapf.c
View
@@ -109,7 +109,8 @@ int mmapf(mmapf_ctx *ctx, const unsigned char *filename, size_t size, int flags)
return ENOENT;
}
- if ((ret = posix_fadvise(fd, 0, size, fadv)) != 0) { return ret; }
+ //if ((ret = posix_fadvise(fd, 0, size, fadv)) != 0) { return ret; }
+ posix_fadvise(fd, 0, size, fadv); // ignore result
ctx->mem = mmap(NULL, ctx->mmap_sz, mmode, mflags, fd, 0);
}

0 comments on commit 5e45cf8

Please sign in to comment.