void-packages/srcpkgs/trace-cmd/patches/musl-limits_h.patch
Đoàn Trần Công Danh 4f75cf25fd srcpkgs/t*: 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

40 lines
1.2 KiB
Diff

--- a/include/tracefs/tracefs.h 2020-07-17 17:14:20.000000000 +0200
+++ b/include/tracefs/tracefs.h 2020-07-18 16:27:27.559697340 +0200
@@ -6,6 +6,7 @@
#ifndef _TRACE_FS_H
#define _TRACE_FS_H
+#include <limits.h>
#include "traceevent/event-parse.h"
char *tracefs_get_tracing_file(const char *name);
--- a/lib/trace-cmd/trace-plugin.c 2020-07-17 17:14:20.000000000 +0200
+++ b/lib/trace-cmd/trace-plugin.c 2020-07-18 16:33:40.323675122 +0200
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <dlfcn.h>
+#include <limits.h>
#include <sys/stat.h>
#include <libgen.h>
#include "trace-cmd.h"
--- a/tracecmd/trace-agent.c 2020-07-17 17:14:20.000000000 +0200
+++ b/tracecmd/trace-agent.c 2020-07-18 16:35:53.882667161 +0200
@@ -14,6 +14,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
+#include <limits.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/wait.h>
--- a/tracecmd/trace-setup-guest.c 2020-07-17 17:14:20.000000000 +0200
+++ b/tracecmd/trace-setup-guest.c 2020-07-18 16:37:29.463661464 +0200
@@ -13,6 +13,7 @@
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <limits.h>
#include "trace-local.h"
#include "trace-msg.h"