--- dmraid/include/dmraid/format.h.old	2010-03-18 16:53:16.000000000 +0000
+++ dmraid/include/dmraid/format.h	2018-07-15 01:14:39.710000000 +0000
@@ -213,7 +213,7 @@
 extern void *alloc_private(struct lib_context *lc, const char *who,
 			   size_t size);
 extern void *alloc_private_and_read(struct lib_context *lc, const char *who,
-				    size_t size, char *path, loff_t offset);
+				    size_t size, char *path, off_t offset);
 extern struct raid_set *join_superset(struct lib_context *lc,
 				      char *(*f_name) (struct lib_context * lc,
 						       struct raid_dev * rd,
--- dmraid/include/dmraid/misc.h.old	2010-10-27 11:31:46.000000000 +0000
+++ dmraid/include/dmraid/misc.h	2018-07-15 01:14:39.710000000 +0000
@@ -33,9 +33,9 @@
 extern int mk_dir(struct lib_context *lc, const char *dir);
 
 extern int read_file(struct lib_context *lc, const char *who, char *path,
-		     void *buffer, size_t size, loff_t offset);
+		     void *buffer, size_t size, off_t offset);
 extern int write_file(struct lib_context *lc, const char *who, char *path,
-		      void *buffer, size_t size, loff_t offset);
+		      void *buffer, size_t size, off_t offset);
 
 extern int yes_no_prompt(struct lib_context *lc, const char *prompt, ...);
 
--- dmraid/lib/misc/file.c.old	2010-01-11 16:19:29.000000000 +0000
+++ dmraid/lib/misc/file.c	2018-07-15 01:14:39.710000000 +0000
@@ -53,10 +53,10 @@
 
 static int
 rw_file(struct lib_context *lc, const char *who, int flags,
-	char *path, void *buffer, size_t size, loff_t offset)
+	char *path, void *buffer, size_t size, off_t offset)
 {
 	int fd, ret = 0;
-	loff_t o;
+	off_t o;
 	struct {
 		ssize_t(*func) ();
 		const char *what;
@@ -73,7 +73,7 @@
 #else
 #define	DMRAID_LSEEK	lseek64
 #endif
-	if (offset && (o = DMRAID_LSEEK(fd, offset, SEEK_SET)) == (loff_t) - 1)
+	if (offset && (o = DMRAID_LSEEK(fd, offset, SEEK_SET)) == (off_t) - 1)
 		log_err(lc, "%s: seeking device \"%s\" to %" PRIu64,
 			who, path, offset);
 	else if (rw->func(fd, buffer, size) != size)
@@ -88,14 +88,14 @@
 
 int
 read_file(struct lib_context *lc, const char *who, char *path,
-	  void *buffer, size_t size, loff_t offset)
+	  void *buffer, size_t size, off_t offset)
 {
 	return rw_file(lc, who, O_RDONLY, path, buffer, size, offset);
 }
 
 int
 write_file(struct lib_context *lc, const char *who, char *path,
-	   void *buffer, size_t size, loff_t offset)
+	   void *buffer, size_t size, off_t offset)
 {
 	/* O_CREAT|O_TRUNC are noops on a devnode. */
 	return rw_file(lc, who, O_WRONLY | O_CREAT | O_TRUNC, path,
--- dmraid/lib/format/format.c.old	2009-09-16 11:45:14.000000000 +0000
+++ dmraid/lib/format/format.c		2018-07-15 01:14:39.720000000 +0000
@@ -183,7 +183,7 @@
 /* Allocate private space in format handlers and read data off device. */
 void *
 alloc_private_and_read(struct lib_context *lc, const char *who,
-		       size_t size, char *path, loff_t offset)
+		       size_t size, char *path, off_t offset)
 {
 	void *ret;