void-packages/srcpkgs/nwipe/patches/0001-musl-build-fix.patch
Đoàn Trần Công Danh 65749575ab srcpkgs/n*: 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

27 lines
583 B
Diff

From 8871bf692e3b5012fdb0ea069b81c6a8db8ef85f Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Mon, 21 Dec 2020 12:05:43 -0600
Subject: [PATCH] musl build fix
musl does not have bits/sigthread.h
---
src/nwipe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git src/nwipe.c src/nwipe.c
index 2c9c851..487177e 100644
--- a/src/nwipe.c
+++ b/src/nwipe.c
@@ -32,7 +32,9 @@
#include <signal.h>
#include <pthread.h>
#include <sys/types.h>
+#if defined(__GLIBC__)
#include <bits/sigthread.h>
+#endif
#include "nwipe.h"
#include "context.h"
--
2.29.2