posix_fadvice is not available on kFreeBSD.

Forwarded: David Robillard <d@drobilla.net>

Gbp-Pq: Name 0001-kfreebsd_ftbfs.patch
This commit is contained in:
Alessio Treglia 2022-06-27 15:39:51 +08:00 committed by Lu zhiping
parent d68f14b4f4
commit 9475483e83
1 changed files with 2 additions and 0 deletions

View File

@ -62,7 +62,9 @@ serd_fopen(const char* path, const char* mode)
return NULL;
}
#if defined(HAVE_POSIX_FADVISE) && defined(HAVE_FILENO)
#ifndef __FreeBSD_kernel__
posix_fadvise(fileno(fd), 0, 0, POSIX_FADV_SEQUENTIAL);
#endif /*__FreeBSD_kernel__*/
#endif
return fd;
}