Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 1 | From c4f85268da6c30b0aec3d9a0e951b2088887cff4 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Mon, 22 May 2023 18:35:37 -0700 |
| 4 | Subject: [PATCH] cow.c: Replace stat64 with stat |
| 5 | |
| 6 | LFS64 is deprecated in latest musl and this fails to build |
| 7 | therefore switch to using stat API which is same as stat64 these days |
| 8 | |
| 9 | Upstream-Status: Inappropriate [No upstream] |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | --- |
| 12 | moo/cow.c | 4 ++-- |
| 13 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 14 | |
| 15 | --- a/moo/cow.c |
| 16 | +++ b/moo/cow.c |
| 17 | @@ -161,7 +161,7 @@ int write_cow_header(char *cow_file, int |
| 18 | int sectorsize, int alignment, long long *size) |
| 19 | { |
| 20 | struct cow_header_v3 *header; |
| 21 | - struct stat64 buf; |
| 22 | + struct stat buf; |
| 23 | int err; |
| 24 | |
| 25 | err = cow_seek_file(fd, 0); |
| 26 | @@ -192,7 +192,7 @@ int write_cow_header(char *cow_file, int |
| 27 | backing_file)) |
| 28 | goto out_free; |
| 29 | |
| 30 | - err = stat64(header->backing_file, &buf); |
| 31 | + err = stat(header->backing_file, &buf); |
| 32 | if(err < 0){ |
| 33 | cow_printf("Stat of backing file '%s' failed, errno = %d\n", |
| 34 | header->backing_file, errno); |