summaryrefslogtreecommitdiff
path: root/lib/ext2fs/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ext2fs/fileio.c')
-rw-r--r--lib/ext2fs/fileio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/ext2fs/fileio.c b/lib/ext2fs/fileio.c
index f0e55e14..fbe10fb9 100644
--- a/lib/ext2fs/fileio.c
+++ b/lib/ext2fs/fileio.c
@@ -15,7 +15,11 @@
#include <unistd.h>
#endif
+#if EXT2_FLAT_INCLUDES
+#include "ext2_fs.h"
+#else
#include <linux/ext2_fs.h>
+#endif
#include "ext2fs.h"
@@ -145,7 +149,7 @@ errcode_t ext2fs_file_read(ext2_file_t file, void *buf,
errcode_t retval;
blk_t b, pb;
unsigned int start, left, c, count = 0;
- char *ptr = buf;
+ char *ptr = (char *) buf;
EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
fs = file->fs;
@@ -215,7 +219,7 @@ errcode_t ext2fs_file_write(ext2_file_t file, void *buf,
errcode_t retval;
blk_t b, pb;
unsigned int start, c, count = 0;
- char *ptr = buf;
+ char *ptr = (char *) buf;
EXT2_CHECK_MAGIC(file, EXT2_ET_MAGIC_EXT2_FILE);
fs = file->fs;