blob: 9867dc0d1b4f4981a0eaa6368f670cdfe49e7999 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
assorted fixes for musl
--- a/src/include/spf_dns.h
+++ a/src/include/spf_dns.h
@@ -99,11 +99,13 @@
*/
#if !defined(HAVE_NETDB_H) && !defined(_WIN32)
-#define NETDB_SUCCESS 0
#define HOST_NOT_FOUND 1 /**< NXDOMAIN (authoritative answer)*/
#define TRY_AGAIN 2 /**< SERVFAIL (no authoritative answer)*/
#define NO_RECOVERY 3 /**< invalid/unimplmeneted query */
#define NO_DATA 4 /**< host found, but no RR of req type*/
+#endif
+#ifndef NETDB_SUCCESS
+#define NETDB_SUCCESS 0
#endif
typedef int SPF_dns_stat_t;
--- a/src/libspf2/spf_dns_resolv.c
+++ b/src/libspf2/spf_dns_resolv.c
@@ -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 && HAVE_RES_CLOSE
res_close();
#endif
|