opendkim: Fix compilation with uClibc-ng 9515/head
authorRosen Penev <rosenp@gmail.com>
Fri, 19 Jul 2019 07:02:21 +0000 (00:02 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 19 Jul 2019 07:06:46 +0000 (00:06 -0700)
res_nsend and res_send are both not available in uClibc-ng as configured
in OpenWrt. Having this function return an error is the only sensible way
to fix.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
mail/opendkim/Makefile
mail/opendkim/patches/020-uclibc.patch [new file with mode: 0644]

index eaf0f81e6e4c97c52f5239b888494438a467b6db..ded120fa34e3b7c982571f2c04ea6ebe9fa943d4 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opendkim
 PKG_VERSION:=2.10.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
diff --git a/mail/opendkim/patches/020-uclibc.patch b/mail/opendkim/patches/020-uclibc.patch
new file mode 100644 (file)
index 0000000..b74c3a9
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/libopendkim/dkim-dns.c
++++ b/libopendkim/dkim-dns.c
+@@ -163,6 +163,9 @@ int
+ dkim_res_query(void *srv, int type, unsigned char *query, unsigned char *buf,
+                size_t buflen, void **qh)
+ {
++#ifdef __UCLIBC__
++      return DKIM_DNS_ERROR;
++#else
+       int n;
+       int ret;
+       struct dkim_res_qh *rq;
+@@ -209,6 +212,7 @@ dkim_res_query(void *srv, int type, unsigned char *query, unsigned char *buf,
+       *qh = (void *) rq;
+       return DKIM_DNS_SUCCESS;
++#endif // __UCLIBC__
+ }
+ /*