diff options
author | Shiz <hi@shiz.me> | 2017-04-12 00:35:55 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-12 02:46:55 +0200 |
commit | 36d195d7c2f7a01332478e5fbeda6c8ed7d2b3e3 (patch) | |
tree | 876922a8b4d16a624f0d2523656840e9591c50a9 /main/opensmtpd/missing-decls.patch | |
parent | de957d75f735f67db878f9aa7ad445a9a8a05eb1 (diff) | |
download | aports-36d195d7c2f7a01332478e5fbeda6c8ed7d2b3e3.tar.bz2 aports-36d195d7c2f7a01332478e5fbeda6c8ed7d2b3e3.tar.xz |
main/opensmtpd: fix sendmail crash through undefined declarations
Diffstat (limited to 'main/opensmtpd/missing-decls.patch')
-rw-r--r-- | main/opensmtpd/missing-decls.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/main/opensmtpd/missing-decls.patch b/main/opensmtpd/missing-decls.patch new file mode 100644 index 0000000000..065fbcdbe1 --- /dev/null +++ b/main/opensmtpd/missing-decls.patch @@ -0,0 +1,51 @@ +From 2ab442623e689532910b34ff0dbbc2167da02330 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Wed, 11 Jan 2017 17:39:07 -0600 +Subject: [PATCH] fix musl compatibility (missing function prototypes) + +inet_net_pton is already compiled, but no prototype is provided. +res_hnok is provided by the compatibility layer in libasr. + +These fixes avoid warnings about implicit function declaration. + +Fixes #758 +--- + configure.ac | 1 + + openbsd-compat/openbsd-compat.h | 8 ++++++++ + 2 files changed, 9 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 42e092f..e27c514 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -594,6 +594,7 @@ AC_CHECK_FUNCS([ \ + pledge \ + pw_dup \ + reallocarray \ ++ res_hnok \ + setenv \ + setlinebuf \ + setproctitle \ +diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h +index a51385b..5d2e2c2 100644 +--- a/openbsd-compat/openbsd-compat.h ++++ b/openbsd-compat/openbsd-compat.h +@@ -208,10 +208,18 @@ void *reallocarray(void *, size_t, size_t); + void errc(int, int, const char *, ...); + #endif + ++#ifndef HAVE_INET_NET_PTON ++int inet_net_pton(int, const char *, void *, size_t); ++#endif ++ + #ifndef HAVE_PLEDGE + #define pledge(promises, paths) 0 + #endif + ++#ifndef HAVE_RES_HNOK ++int res_hnok(const char *); ++#endif ++ + #if !HAVE_DECL_AF_LOCAL + #define AF_LOCAL AF_UNIX + #endif |