void-packages/srcpkgs/bananapi-uboot/patches/musl.patch
Đoàn Trần Công Danh c6ce65d3d0 srcpkgs/b*: 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

43 lines
1,017 B
Diff

--- a/include/image.h 2014-08-19 08:42:46.000000000 +0200
+++ b/include/image.h 2020-09-15 10:43:48.410147914 +0200
@@ -19,6 +19,11 @@
#include "compiler.h"
#include <asm/byteorder.h>
+#if !defined(__GLIBC__)
+typedef unsigned long int ulong;
+typedef unsigned long int uintptr_t;
+#endif
+
/* Define this to avoid #ifdefs later on */
struct lmb;
--- a/tools/mkimage.h 2014-08-19 08:42:46.000000000 +0200
+++ b/tools/mkimage.h 2020-09-15 10:46:44.221140904 +0200
@@ -22,6 +22,11 @@
#include "fdt_host.h"
#include "imagetool.h"
+#if !defined(__GLIBC__)
+typedef unsigned long int ulong;
+typedef unsigned long int uintptr_t;
+#endif
+
#undef MKIMAGE_DEBUG
#ifdef MKIMAGE_DEBUG
--- a/tools/proftool.c 2014-08-19 08:42:46.000000000 +0200
+++ b/tools/proftool.c 2020-09-15 10:48:28.212136757 +0200
@@ -20,6 +20,11 @@
#include <compiler.h>
#include <trace.h>
+#if !defined(__GLIBC__)
+typedef unsigned long int ulong;
+typedef unsigned long int uintptr_t;
+#endif
+
#define MAX_LINE_LEN 500
enum {