void-packages/srcpkgs/re/patches/resolver.diff
Đoàn Trần Công Danh 103ab731ab srcpkgs/r*: convert patches to -Np1
* runit is kept at -Np0

```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

28 lines
521 B
Diff

--- a/src/dns/res.c 2016-12-03 15:17:53.000000000 +0100
+++ b/src/dns/res.c 2016-12-03 15:18:30.000000000 +0100
@@ -25,13 +25,9 @@ int get_resolv_dns(char *domain, size_t
uint32_t i;
int ret, err;
-#ifdef OPENBSD
ret = res_init();
state = _res;
-#else
- memset(&state, 0, sizeof(state));
- ret = res_ninit(&state);
-#endif
+
if (0 != ret)
return ENOENT;
@@ -56,10 +52,5 @@ int get_resolv_dns(char *domain, size_t
*n = i;
out:
-#ifdef OPENBSD
-#else
- res_nclose(&state);
-#endif
-
return err;
}