void-packages/srcpkgs/sutils/patches/getopt-unsigned-char.patch
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

92 lines
2.3 KiB
Diff

From f35ea442858c362703d2fccb66a94b99f812f8a7 Mon Sep 17 00:00:00 2001
From: TomFrost <tom@frosteddesign.com>
Date: Mon, 11 Apr 2016 21:50:02 -0400
Subject: [PATCH] Change opt char to int for armv7 compatability
---
battery.c | 2 +-
clock.c | 2 +-
essid.c | 2 +-
exist.c | 2 +-
temp.c | 2 +-
volume.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/battery.c b/battery.c
index 5cc45b4..20307e5 100644
--- a/battery.c
+++ b/battery.c
@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
int interval = INTERVAL;
bool snoop = false;
- char opt;
+ int opt;
while ((opt = getopt(argc, argv, "hsf:i:p:n:")) != -1) {
switch (opt) {
case 'h':
diff --git a/clock.c b/clock.c
index 0847787..e2c0530 100644
--- a/clock.c
+++ b/clock.c
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
int interval = INTERVAL;
bool snoop = false;
- char opt;
+ int opt;
while ((opt = getopt(argc, argv, "hsf:i:")) != -1) {
switch (opt) {
case 'h':
diff --git a/essid.c b/essid.c
index 2143556..4a768f0 100644
--- a/essid.c
+++ b/essid.c
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
char *interface = INTERFACE;
bool snoop = false;
- char opt;
+ int opt;
while ((opt = getopt(argc, argv, "hsf:i:w:")) != -1) {
switch (opt) {
case 'h':
diff --git a/exist.c b/exist.c
index 27fdfca..3de5eb8 100644
--- a/exist.c
+++ b/exist.c
@@ -14,7 +14,7 @@ void check_file(char *pth, bool inv) {
}
int main(int argc, char *argv[]) {
- char opt;
+ int opt;
bool invert_matches = false;
while ((opt = getopt(argc, argv, "hv")) != -1) {
diff --git a/temp.c b/temp.c
index 98ab33e..e93bc74 100644
--- a/temp.c
+++ b/temp.c
@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
int interval = INTERVAL;
bool snoop = false;
- char opt;
+ int opt;
while ((opt = getopt(argc, argv, "hsf:i:p:n:")) != -1) {
switch (opt) {
case 'h':
diff --git a/volume.c b/volume.c
index 32e186a..8117279 100644
--- a/volume.c
+++ b/volume.c
@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
int interval = INTERVAL;
bool snoop = false;
- char opt;
+ int opt;
while ((opt = getopt(argc, argv, "hsf:i:d:v:m:")) != -1) {
switch (opt) {
case 'h':