Selaa lähdekoodia

Add statvfs.h.in to CMake directory

Gbp-Dch: ignore
Julian Andres Klode 10 vuotta sitten
vanhempi
commit
fa1b5d86bf
2 muutettua tiedostoa jossa 14 lisäystä ja 1 poistoa
  1. 13 0
      CMake/statvfs.h.in
  2. 1 1
      CMakeLists.txt

+ 13 - 0
CMake/statvfs.h.in

@@ -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

+ 1 - 1
CMakeLists.txt

@@ -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)