From 65d44426801f0b0999387328634aa8ebf97b0603 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 2 May 2019 22:32:09 -0700 Subject: [PATCH] postfix: Fix compilation with uClibc-ng Signed-off-by: Rosen Penev --- mail/postfix/Makefile | 2 +- ...ookup-Fix-compilation-with-uClibc-ng.patch | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index 3c499c2523..f25e054a9d 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=postfix -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_VERSION:=3.4.4 PKG_SOURCE_URL:= \ https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \ diff --git a/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch b/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch new file mode 100644 index 0000000000..2bc874fc22 --- /dev/null +++ b/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch @@ -0,0 +1,36 @@ +From 4fe5b1f216f1643080299bdb35e07f07b9c2caae Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Thu, 2 May 2019 22:28:57 -0700 +Subject: [PATCH] dns_lookup: Fix compilation with uClibc-ng + +uClibc-ng does not have res_send or res_nsend. ifdef the entire function. +--- + src/dns/dns_lookup.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/dns/dns_lookup.c b/src/dns/dns_lookup.c +index 1ea98b3..d7771d4 100644 +--- a/src/dns/dns_lookup.c ++++ b/src/dns/dns_lookup.c +@@ -311,6 +311,10 @@ typedef struct DNS_REPLY { + static int dns_res_query(const char *name, int class, int type, + unsigned char *answer, int anslen) + { ++#ifdef __UCLIBC__ ++ msg_info("dns_res_query() is not supported under uClibc"); ++ return 0; ++#else + unsigned char msg_buf[MAX_DNS_QUERY_SIZE]; + HEADER *reply_header = (HEADER *) answer; + int len; +@@ -369,6 +373,7 @@ static int dns_res_query(const char *name, int class, int type, + } + return (len); + } ++#endif + } + + /* dns_res_search - res_search() that can return negative replies */ +-- +2.17.1 + -- 2.30.2