Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 2 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#! /bin/sh /usr/share/dpatch/dpatch-run
## 20_spf_dns_include_std_headers.dpatch by Magnus Holmgren <magnus@kibibyte.se>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Include arpa/nameser.h and netdb.h from spf_dns.h instead of defining 
## DP: the constants needed unless certain HAVE_ macros are defined.

@DPATCH@

diff -Nur libspf2-1.2.5.dfsg/src/include/spf_dns.h libspf2-1.2.5.dfsg.new/src/include/spf_dns.h
--- libspf2-1.2.5.dfsg/src/include/spf_dns.h    2004-08-29 16:59:33.000000000 +0200
+++ libspf2-1.2.5.dfsg.new/src/include/spf_dns.h        2007-03-23 18:04:17.000000000 +0100
@@ -61,43 +61,12 @@
  * 
  */
 
-
-/*
- * For those who don't have <arpa/nameserv.h>
+/* The following two header files might not exist on all platforms,
+ * but at least they exist on Debian with libc6.
  */
+#include <arpa/nameser.h>
+#include <netdb.h>
 
-#if !defined( HAVE_NS_TYPE )
-
-#define        ns_t_invalid    0
-#define        ns_t_a          1
-#define        ns_t_ns         2
-#define        ns_t_cname      5
-#define        ns_t_ptr        12
-#define        ns_t_mx         15
-#define        ns_t_txt        16
-#define ns_t_aaaa      28
-/* #define ns_t_a6             38 */
-#define        ns_t_any        255             /* Wildcard match. */
-
-typedef int    ns_type;
-#endif
-
-#ifndef ns_t_invalid
-#define        ns_t_invalid    0
-#endif
-
-
-/*
- * For those who don't have <netdb.h>
- */
-
-#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
 typedef int SPF_dns_stat_t;
 
 typedef struct SPF_dns_server_struct SPF_dns_server_t;