ext4_utils: Add support for >2G input files
Change-Id: I6af69d676610099d3912e90fcab3cbdc27ace4e2
diff --git a/ext4_utils/extent.c b/ext4_utils/extent.c
index 1d2581d..daa2541 100644
--- a/ext4_utils/extent.c
+++ b/ext4_utils/extent.c
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-#include <stdlib.h>
-#include <stdio.h>
-
#include "ext4_utils.h"
#include "ext4.h"
#include "ext4_extents.h"
#include "backed_block.h"
-
#include "extent.h"
+#include <stdlib.h>
+#include <stdio.h>
+
+
/* Creates data buffers for the first backing_len bytes of a block allocation
and queues them to be written */
static u8 *extent_create_backing(struct block_allocation *alloc,
@@ -55,7 +55,7 @@
static void extent_create_backing_file(struct block_allocation *alloc,
u64 backing_len, const char *filename)
{
- off_t offset = 0;
+ off64_t offset = 0;
for (; alloc != NULL && backing_len > 0; get_next_region(alloc)) {
u32 region_block;
u32 region_len;