void-packages/srcpkgs/tgt/patches/musl-__wordsize.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

38 lines
938 B
Diff

The definition of __WORDSIZE is found in <sys/reg.h>
--- a/usr/iscsi/iscsid.h 2015-11-03 04:58:36.000000000 +0100
+++ b/usr/iscsi/iscsid.h 2015-11-04 16:23:25.029877334 +0100
@@ -22,6 +22,9 @@
#include <stdint.h>
#include <inttypes.h>
#include <netdb.h>
+#if !defined(__GLIBC__)
+#include <sys/reg.h>
+#endif
#include "transport.h"
#include "list.h"
--- a/usr/tgtd.h 2015-11-04 16:25:05.435884573 +0100
+++ b/usr/tgtd.h 2015-11-04 16:25:52.415887960 +0100
@@ -2,6 +2,9 @@
#ifndef __TARGET_DAEMON_H
#define __TARGET_DAEMON_H
+#if !defined(__GLIBC__)
+#include <sys/reg.h>
+#endif
#include "log.h"
#include "scsi_cmnd.h"
#include "tgtadm_error.h"
--- a/usr/util.h 2015-11-04 16:26:22.262890112 +0100
+++ b/usr/util.h 2015-11-04 16:27:01.364892931 +0100
@@ -16,6 +16,9 @@
#include <string.h>
#include <limits.h>
#include <linux/types.h>
+#if !defined(__GLIBC__)
+#include <sys/reg.h>
+#endif
#include "be_byteshift.h"