summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/libspf2/APKBUILD8
-rw-r--r--main/libspf2/libspf2-res_ninit-uclibc.patch64
2 files changed, 68 insertions, 4 deletions
diff --git a/main/libspf2/APKBUILD b/main/libspf2/APKBUILD
index b09ea23d6..89d2351d0 100644
--- a/main/libspf2/APKBUILD
+++ b/main/libspf2/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libspf2
pkgver=1.2.9
-pkgrel=2
+pkgrel=3
pkgdesc="Sender Policy Framework library, a part of the SPF/SRS protocol pair."
url="http://www.libspf2.org"
license="LGPL-2.1 BSD-2"
@@ -11,6 +11,7 @@ depends=
source="http://www.libspf2.org/spf/libspf2-$pkgver.tar.gz
libspf2-localpolicy-fix.patch
0001-provide-dn_skipname.patch
+ libspf2-res_ninit-uclibc.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -27,8 +28,6 @@ build() {
cd "$_builddir"
./configure --prefix=/usr \
|| return 1
- # uclibc claims to have res_ninit() but it doesnt.
- sed -i -e 's:HAVE_DECL_RES_NINIT 1:HAVE_DECL_RES_NINIT 0:' config.h
make || return 1
}
@@ -38,4 +37,5 @@ package() {
}
md5sums="3305df4d1b13ca964d80b23bb5e4e2b6 libspf2-1.2.9.tar.gz
48d82a6af8c513d75a7402f2933b8b0a libspf2-localpolicy-fix.patch
-201889cbd209aa7cae9ce11ed5ebaaa6 0001-provide-dn_skipname.patch"
+201889cbd209aa7cae9ce11ed5ebaaa6 0001-provide-dn_skipname.patch
+06c981fcca0434d447f8a2749b51696f libspf2-res_ninit-uclibc.patch"
diff --git a/main/libspf2/libspf2-res_ninit-uclibc.patch b/main/libspf2/libspf2-res_ninit-uclibc.patch
new file mode 100644
index 000000000..ae9ba9add
--- /dev/null
+++ b/main/libspf2/libspf2-res_ninit-uclibc.patch
@@ -0,0 +1,64 @@
+diff --git a/src/libspf2/spf_dns_resolv.c b/src/libspf2/spf_dns_resolv.c
+index 10ccee6..7acdd1f 100644
+--- a/src/libspf2/spf_dns_resolv.c
++++ b/src/libspf2/spf_dns_resolv.c
+@@ -79,13 +79,13 @@ static const struct res_sym ns_sects[] = {
+ static const int num_ns_sect = sizeof(ns_sects) / sizeof(*ns_sects);
+
+
+-#if HAVE_DECL_RES_NINIT
++#if HAVE_DECL_RES_NINIT && !defined(__UCLIBC__)
+ # define SPF_h_errno res_state->res_h_errno
+ #else
+ # define SPF_h_errno h_errno
+ #endif
+
+-#if HAVE_DECL_RES_NINIT
++#if HAVE_DECL_RES_NINIT && !defined(__UCLIBC__)
+ static pthread_once_t res_state_control = PTHREAD_ONCE_INIT;
+ static pthread_key_t res_state_key;
+
+@@ -239,14 +239,14 @@ SPF_dns_resolv_lookup(SPF_dns_server_t *spf_dns_server,
+ size_t rdlen;
+ const u_char *rdata;
+
+-#if HAVE_DECL_RES_NINIT
++#if HAVE_DECL_RES_NINIT && !defined(__UCLIBC__)
+ void *res_spec;
+ struct __res_state *res_state;
+ #endif
+
+ SPF_ASSERT_NOTNULL(spf_dns_server);
+
+-#if HAVE_DECL_RES_NINIT
++#if HAVE_DECL_RES_NINIT && !defined(__UCLIBC__)
+ /** Get the thread-local resolver state. */
+ res_spec = pthread_getspecific(res_state_key);
+ if (res_spec == NULL) {
+@@ -292,7 +292,7 @@ SPF_dns_resolv_lookup(SPF_dns_server_t *spf_dns_server,
+ for (;;) {
+ int dns_len;
+
+-#if HAVE_DECL_RES_NINIT
++#if HAVE_DECL_RES_NINIT && !defined(__UCLIBC__)
+ /* Resolve the name. */
+ dns_len = res_nquery(res_state, domain, ns_c_in, rr_type,
+ responsebuf, responselen);
+@@ -606,7 +606,7 @@ SPF_dns_resolv_free(SPF_dns_server_t *spf_dns_server)
+ {
+ SPF_ASSERT_NOTNULL(spf_dns_server);
+
+-#if ! HAVE_DECL_RES_NINIT
++#if ! HAVE_DECL_RES_NINIT || defined(__UCLIBC__)
+ res_close();
+ #endif
+
+@@ -619,7 +619,7 @@ SPF_dns_resolv_new(SPF_dns_server_t *layer_below,
+ {
+ SPF_dns_server_t *spf_dns_server;
+
+-#if HAVE_DECL_RES_NINIT
++#if HAVE_DECL_RES_NINIT && !defined(__UCLIBC__)
+ pthread_once(&res_state_control, SPF_dns_resolv_init_key);
+ #else
+ if (res_init() != 0) {