void-packages/srcpkgs/libmilter/patches/glibc230.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

59 lines
1.5 KiB
Diff

The former deprecated macro RES_USE_INET6 is gone with glibc 2.30
Source: openSUSE
---
libmilter/sm_gethost.c | 6 ++++--
sendmail/conf.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
--- a/libmilter/sm_gethost.c
+++ b/libmilter/sm_gethost.c 2019-09-28 07:27:46.512228011 +0000
@@ -51,18 +51,20 @@ sm_getipnodebyname(name, family, flags,
{
bool resv6 = true;
struct hostent *h;
-
+#ifdef RES_USE_INET6
if (family == AF_INET6)
{
/* From RFC2133, section 6.1 */
resv6 = bitset(RES_USE_INET6, _res.options);
_res.options |= RES_USE_INET6;
}
+#endif
SM_SET_H_ERRNO(0);
h = gethostbyname(name);
+#ifdef RES_USE_INET6
if (family == AF_INET6 && !resv6)
_res.options &= ~RES_USE_INET6;
-
+#endif
/* the function is supposed to return only the requested family */
if (h != NULL && h->h_addrtype != family)
{
--- a/sendmail/conf.c
+++ b/sendmail/conf.c 2019-09-28 07:28:39.103245002 +0000
@@ -4242,18 +4242,20 @@ sm_getipnodebyname(name, family, flags,
# else /* HAS_GETHOSTBYNAME2 */
bool resv6 = true;
-
+#ifdef RES_USE_INET6
if (family == AF_INET6)
{
/* From RFC2133, section 6.1 */
resv6 = bitset(RES_USE_INET6, _res.options);
_res.options |= RES_USE_INET6;
}
+#endif
SM_SET_H_ERRNO(0);
h = gethostbyname(name);
+#ifdef RES_USE_INET6
if (!resv6)
_res.options &= ~RES_USE_INET6;
-
+#endif
/* the function is supposed to return only the requested family */
if (h != NULL && h->h_addrtype != family)
{