void-packages/srcpkgs/libnl/patches/fix-includes.patch
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

25 lines
516 B
Diff

--- a/lib/netfilter/log.c
+++ b/lib/netfilter/log.c
@@ -18,6 +18,7 @@
* @{
*/
+#include <byteswap.h>
#include <sys/types.h>
#include <linux/netfilter/nfnetlink_log.h>
--- a/include/netlink/netlink.h
+++ b/include/netlink/netlink.h
@@ -12,11 +12,11 @@
#ifndef NETLINK_NETLINK_H_
#define NETLINK_NETLINK_H_
+#include <poll.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
-#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/time.h>