Re: [Squid Bug 723] need <sys/param.h> and <sys/mount.h> to use statfs

From: Alan Barrett <apb@dont-contact.us>
Date: Tue, 29 Jul 2003 13:57:28 +0200

I promised to send a patch. Here it is.

--apb (Alan Barrett)

Index: configure.in
===================================================================
RCS file: /cvsroot/squid/squid3/configure.in,v
retrieving revision 1.41
diff -u -r1.41 configure.in
--- configure.in 29 Jul 2003 02:12:34 -0000 1.41
+++ configure.in 29 Jul 2003 10:55:13 -0000
@@ -1477,6 +1477,7 @@
         sys/file.h \
         sys/ioctl.h \
         sys/param.h \
+ sys/mount.h \
         sys/msg.h \
         sys/resource.h \
         sys/select.h\
Index: src/store_dir.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/store_dir.cc,v
retrieving revision 1.11
diff -u -r1.11 store_dir.cc
--- src/store_dir.cc 23 Jul 2003 02:12:51 -0000 1.11
+++ src/store_dir.cc 29 Jul 2003 11:40:49 -0000
@@ -42,8 +42,15 @@
 #if HAVE_SYS_STATVFS_H
 #include <sys/statvfs.h>
 #endif
+#endif /* HAVE_STATVFS */
+/* statfs() needs <sys/param.h> and <sys/mount.h> on BSD systems */
+#if HAVE_SYS_PARAM_H
+#include <sys/param.h>
 #endif
-/* Windows uses sys/vfs.h */
+#if HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+/* Windows and Linux use sys/vfs.h */
 #if HAVE_SYS_VFS_H
 #include <sys/vfs.h>
 #endif
Received on Tue Jul 29 2003 - 05:57:49 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:18 MST