diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-10-31 10:46:22 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-10-31 10:48:06 +0100 |
commit | 92b848f05c63ce52cab1416e8b063cccbe341bb1 (patch) | |
tree | 983293fb2bce8131823770248cc2adc2d290cafb | |
parent | 94d0633ac6e323828f2f6dc89ee71d307e4c71f4 (diff) |
Don’t use posix_fadvise() on MacOS or OpenBSD
These systems (despite being POSIX) have not yet implemented this
function/syscall.
-rw-r--r-- | src/work.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -82,7 +82,9 @@ process_file(const char *locl_filename, unsigned char **locl_buf) goto err; } +#if !defined(__APPLE__) && !defined(__OpenBSD__) (void)posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_WILLNEED); +#endif struct stat st; if (fstat(fd, &st) == -1) { |