Skip to content

Commit

Permalink
allow fadvise to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancdotorg committed Oct 20, 2015
1 parent d6c1c7c commit 5e45cf8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmapf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 5e45cf8

Please sign in to comment.