Whamcloud - gitweb
libext2fs: fix build issue for on Windows/Cygwin systems
authorTheodore Ts'o <tytso@mit.edu>
Tue, 4 Jul 2017 01:28:53 +0000 (21:28 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 4 Jul 2017 01:28:53 +0000 (21:28 -0400)
Provide ext2fs_get_device_size2() for Windows/Cygwin systems, so
builds can succeed.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/getsize.c

index 89c33d4..f3839ba 100644 (file)
@@ -71,8 +71,8 @@
 #define HAVE_GET_FILE_SIZE_EX 1
 #endif
 
-errcode_t ext2fs_get_device_size(const char *file, int blocksize,
-                                blk_t *retblocks)
+errcode_t ext2fs_get_device_size2(const char *file, int blocksize,
+                                 blk64_t *retblocks)
 {
        HANDLE dev;
        PARTITION_INFORMATION pi;
@@ -272,6 +272,8 @@ out:
        return rc;
 }
 
+#endif /* WIN32 */
+
 errcode_t ext2fs_get_device_size(const char *file, int blocksize,
                                 blk_t *retblocks)
 {
@@ -287,8 +289,6 @@ errcode_t ext2fs_get_device_size(const char *file, int blocksize,
        return 0;
 }
 
-#endif /* WIN32 */
-
 #ifdef DEBUG
 int main(int argc, char **argv)
 {