1 From 9b46e151b9fdaf5684618482e69ef4a307c0d47c Mon Sep 17 00:00:00 2001
2 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>
3 Date: Sun, 18 Feb 2024 19:54:21 +0000
4 Subject: [PATCH] darwin build fixes
7 compat.h | 14 ++++++++++++++
15 8 files changed, 21 insertions(+)
16 create mode 100644 src/compat.h
18 diff --git a/compat.h b/compat.h
20 index 0000000..181c8ea
27 +_Static_assert(sizeof(off_t) == 8, "off_t must be 8 bytes");
28 +typedef off_t off64_t;
30 +#define lseek64 lseek
32 +#define POSIX_FADV_SEQUENTIAL 1
33 +static inline int posix_fadvise(int fd, off_t offset, off_t len, int advice)
38 diff --git a/dev.c b/dev.c
39 index c1ce748..ae3ce2c 100644
43 #include <scsi/scsi_ioctl.h>
44 #include <linux/cdrom.h>
50 diff --git a/error.c b/error.c
51 index d2f8acf..550e1af 100644
56 #include <sys/types.h>
60 void error_exit(char *format, ...)
62 diff --git a/io.c b/io.c
63 index 9d66534..e784d75 100644
68 #include <sys/types.h>
74 diff --git a/mergebad.c b/mergebad.c
75 index 34a6ef7..580c3bc 100644
86 diff --git a/recoverdm.c b/recoverdm.c
87 index 8b71ae1..5dddeb3 100644
98 diff --git a/utils.c b/utils.c
99 index 5791404..ee42a0a 100644
110 diff --git a/utils.h b/utils.h
111 index c749c2e..acb0888 100644
116 void * mymalloc(size_t size, char *what);
117 void * myrealloc(void *oldp, size_t newsize, char *what);
118 off64_t get_filesize(char *filename);