evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / sc / scrounge-ntfs / darwin.diff
blobfb4620198d073ecb0777a1f05e0957788a376d6d
1 diff -ur a/src/compat.h b/src/compat.h
2 --- a/src/compat.h 2007-05-27 00:59:43.000000000 +0000
3 +++ b/src/compat.h 2024-02-17 11:53:01.541895388 +0000
4 @@ -27,6 +27,7 @@
5 #ifdef HAVE_CONFIG_H
6 #include "config.h"
7 #endif
8 +#include <sys/stat.h>
9 #endif
11 #include <sys/types.h>
12 @@ -186,6 +187,8 @@
13 void vwarnc(int code, const char *fmt, va_list ap);
14 void warnx(const char *fmt, ...);
15 void vwarnx(const char *fmt, va_list ap);
16 +#else
17 +#include <err.h>
18 #endif
20 #ifndef HAVE_REALLOCF
21 @@ -323,7 +326,8 @@
22 #ifdef _WIN32
23 #define lseek64 _lseeki64
24 #else
25 - #if SIZEOF_OFF_T == 8
26 + #if SIZEOF_OFF_T == 8 || defined(__APPLE__)
27 + _Static_assert(sizeof(off_t) == 8, "off_t must be 8 bytes");
28 #define lseek64 lseek
29 #else
30 #error ERROR: Must have a working 64 bit seek function
31 diff -ur a/src/ntfs.c b/src/ntfs.c
32 --- a/src/ntfs.c 2007-05-27 01:00:08.000000000 +0000
33 +++ b/src/ntfs.c 2024-02-17 11:48:19.402694507 +0000
34 @@ -20,7 +20,7 @@
35 #include "usuals.h"
36 #include "ntfs.h"
38 -#include "malloc.h"
39 +#include "stdlib.h"
40 #include "string.h"