[master] b6153d8b3 Fix #includes to match optimistic use of fallocate on EXT4 on linux
    Poul-Henning Kamp 
    phk at FreeBSD.org
       
    Wed May  1 12:22:04 UTC 2024
    
    
  
commit b6153d8b353d15c30c84b3cc0c51453dc97a4b80
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed May 1 11:46:57 2024 +0000
    Fix #includes to match optimistic use of fallocate on EXT4 on linux
diff --git a/lib/libvarnish/vfil.c b/lib/libvarnish/vfil.c
index df3211343..71debaeee 100644
--- a/lib/libvarnish/vfil.c
+++ b/lib/libvarnish/vfil.c
@@ -42,8 +42,9 @@
 #include <stdint.h>
 #include <string.h>
 #include <sys/statvfs.h>
-#ifdef HAVE_FALLOCATE
+#if defined(__linux__) && defined(HAVE_FALLOCATE)
 #  include <linux/magic.h>
+#  include <sys/vfs.h>
 #endif
 
 #include "vdef.h"
    
    
More information about the varnish-commit
mailing list