fix compilation on freebsd
Costa Tsaousis (ktsaou) committed
Apr 18, 2018 at 23:23 UTC
fcd2885004fe383135883e18ef024a17a2461507
2 files changed
+22
configure.ac
+4
@@ -153,6 +153,10 @@ AC_HEADER_MAJOR
153
AC_HEADER_RESOLV
154
155
AC_CHECK_HEADERS_ONCE([sys/prctl.h])
156
+AC_CHECK_HEADERS_ONCE([sys/vfs.h])
157
+AC_CHECK_HEADERS_ONCE([sys/statfs.h])
158
+AC_CHECK_HEADERS_ONCE([sys/statvfs.h])
159
+AC_CHECK_HEADERS_ONCE([sys/mount.h])
160
161
if test "${enable_accept4}" != "no"; then
162
AC_CHECK_FUNCS_ONCE(accept4)
src/common.h
+18
@@ -74,9 +74,27 @@
74
75
#include <sys/resource.h>
76
#include <sys/socket.h>
77
+
78
+#ifdef HAVE_SYS_STAT_H
79
#include <sys/stat.h>
80
+#endif
81
+
82
+#ifdef HAVE_SYS_VFS_H
83
#include <sys/vfs.h>
84
+#endif
85
+
86
+#ifdef HAVE_SYS_STATFS_H
87
+#include <sys/statfs.h>
88
+#endif
89
+
90
+#ifdef HAVE_SYS_MOUNT_H
91
+#include <sys/mount.h>
92
+#endif
93
+
94
+#ifdef HAVE_SYS_STATVFS_H
95
#include <sys/statvfs.h>
96
+#endif
97
+
98
#include <sys/syscall.h>
99
#include <sys/time.h>
100
#include <sys/types.h>