void-packages/srcpkgs/jfsutils/patches/portability.patch
Đoàn Trần Công Danh 1a06b0d5d7 srcpkgs/j*: 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

24 lines
606 B
Diff

--- a/libfs/devices.h 2005-11-23 07:43:55.000000000 +1100
+++ b/libfs/devices.h 2013-01-06 11:30:25.381538024 +1100
@@ -40,6 +40,8 @@
#define ERROR_INVALID_PARAMETER 87
#define ERROR_DISK_FULL 112
+#include <inttypes.h>
+
struct stat;
int ujfs_get_dev_size(FILE *, int64_t * size);
--- a/libfs/fssubs.c 2015-06-03 19:18:02.225624388 +0200
+++ b/libfs/fssubs.c 2015-06-03 19:18:46.216543510 +0200
@@ -30,8 +30,9 @@
#undef HAVE_GETMNTINFO /* we don't want both */
#endif
-#if HAVE_GETMNTINFO
#include <paths.h>
+
+#if HAVE_GETMNTINFO
#include <sys/param.h>
#include <sys/mount.h>
#endif