void-packages/srcpkgs/curlftpfs/patches/fix-musl.patch
Đoàn Trần Công Danh c987560802 srcpkgs/c*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

29 lines
1,019 B
Diff

--- a/ftpfs.c 2019-03-21 19:21:55.591218591 +0100
+++ b/ftpfs.c 2019-03-21 19:22:10.270696908 +0100
@@ -687,7 +687,7 @@ static int test_exists(const char* path)
return ftpfs_getattr(path, &sbuf);
}
-static __off_t test_size(const char* path)
+static off_t test_size(const char* path)
{
struct stat sbuf;
int err = ftpfs_getattr(path, &sbuf);
@@ -952,7 +952,7 @@ static int ftpfs_truncate(const char* pa
/* fix openoffice problem, truncating exactly to file length */
- __off_t size = (long long int)test_size(path);
+ off_t size = (long long int)test_size(path);
DEBUG(1, "ftpfs_truncate: %s check filesize=%lld\n", path, (long long int)size);
if (offset == size)
@@ -980,7 +980,7 @@ static int ftpfs_ftruncate(const char *
}
/* fix openoffice problem, truncating exactly to file length */
- __off_t size = test_size(path);
+ off_t size = test_size(path);
DEBUG(1, "ftpfs_ftruncate: %s check filesize=%lld\n", path, (long long int)size);
if (offset == size)