diff --git a/libtransmission/fdlimit.c b/libtransmission/fdlimit.c index 746ac6864..c337d3947 100644 --- a/libtransmission/fdlimit.c +++ b/libtransmission/fdlimit.c @@ -47,7 +47,12 @@ #include /* getrlimit */ #endif #include -#include /* O_LARGEFILE */ + +#ifdef HAVE_POSIX_FADVISE + /* required for getting posix_fadvise() from fcntl.h */ + #define _XOPEN_SOURCE 600 +#endif +#include /* O_LARGEFILE; posix_fadvise() */ #include #include