<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Jul 30, 2018 at 6:38 PM Eric Blake <<a href="mailto:eblake@redhat.com">eblake@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 07/29/2018 06:35 AM, Nir Soffer wrote:<br>
> On RHEL 7.5 we need to include <linux/falloc.h> for FALLOC_FL_* macros.<br>
> Without the macros, fallocate is never used and we fall back to manual<br>
> zeroing.<br>
> <br>
<br>
> @@ -41,6 +41,7 @@<br>
>   #include <sys/types.h><br>
>   #include <sys/stat.h><br>
>   #include <errno.h><br>
> +#include <linux/falloc.h>   /* For FALLOC_FL_* on RHEL, glibc < 2.18 */<br>
<br>
This header is not available on all platforms; does it need a configure <br>
check, or do we not care about non-Linux compilation?</blockquote><div><br></div><div>I'm not sure if nbdkit tries to be portable, but I think we should care.</div><div><br></div><div>Is #if defined(__linux__) good enough for this?</div><div> </div><div>Nir</div></div></div>