1 --- mDNSPosix/nss_mdns.c.orig	2012-04-15 06:07:19 UTC
2 +++ mDNSPosix/nss_mdns.c
3 @@ -379,7 +379,18 @@ init_config ();
4  #define ENTNAME  hostent
5  #define DATABASE "hosts"
6 
7 -#include <nss.h>
8 +#if defined __FreeBSD__
9 +# include <nsswitch.h>
10 +enum nss_status {
11 +  NSS_STATUS_SUCCESS = NS_SUCCESS,
12 +  NSS_STATUS_NOTFOUND = NS_NOTFOUND,
13 +  NSS_STATUS_UNAVAIL = NS_UNAVAIL,
14 +  NSS_STATUS_TRYAGAIN = NS_TRYAGAIN,
15 +  NSS_STATUS_RETURN = NS_RETURN
16 +};
17 +#elif defined __Linux__
18 +# include <nss.h>
19 +#endif
20  // For nss_status
21  #include <netdb.h>
22  // For hostent
23 @@ -1684,7 +1695,7 @@ is_applicable_addr (
24  //----------
25  // Types and Constants
26 
27 -const char * k_conf_file = "/etc/nss_mdns.conf";
28 +const char * k_conf_file = PREFIX"/etc/nss_mdns.conf";
29  #define CONF_LINE_SIZE 1024
30 
31  const char k_comment_char = '#';
32