]> git.saurik.com Git - apt.git/commitdiff
Add statvfs.h.in to CMake directory
authorJulian Andres Klode <jak@debian.org>
Tue, 9 Aug 2016 15:39:25 +0000 (17:39 +0200)
committerJulian Andres Klode <jak@debian.org>
Wed, 10 Aug 2016 14:17:19 +0000 (16:17 +0200)
Gbp-Dch: ignore

CMake/statvfs.h.in [new file with mode: 0644]
CMakeLists.txt

diff --git a/CMake/statvfs.h.in b/CMake/statvfs.h.in
new file mode 100644 (file)
index 0000000..d0ec238
--- /dev/null
@@ -0,0 +1,13 @@
+/* Compatibility for systems with out Single Unix Spec statvfs */
+#include <config.h>
+
+#ifdef HAVE_VFS_H
+#include <sys/vfs.h>
+#endif
+
+#ifdef HAVE_MOUNT_H
+#include <sys/param.h>
+#include <sys/mount.h>
+#endif
+
+#define statvfs statfs
index 1f9ca02b8dfdc7cbcdd2d29ded3eb54fff57c5a3..80b9c380c8c368132d655985cef7e82ebc959109 100644 (file)
@@ -92,7 +92,7 @@ if (NOT HAVE_STATVFS)
   if (NOT HAVE_VFS_H AND NOT HAVE_MOUNT_H)
     message(FATAL_ERROR "Can find neither statvfs() nor statfs()")
   endif()
-  configure_file(buildlib/statvfs.h.in ${PROJECT_BINARY_DIR}/include/statvfs.h @ONLY)
+  configure_file(CMake/statvfs.h.in ${PROJECT_BINARY_DIR}/include/statvfs.h @ONLY)
 endif()
 
 CHECK_STRUCT_HAS_MEMBER("struct statfs" f_type sys/vfs.h HAVE_STRUCT_STATFS_F_TYPE)