|
Lines 379-385
Link Here
|
| 379 |
#define ENTNAME hostent |
379 |
#define ENTNAME hostent |
| 380 |
#define DATABASE "hosts" |
380 |
#define DATABASE "hosts" |
| 381 |
|
381 |
|
| 382 |
#include <nss.h> |
382 |
#if defined __FreeBSD__ |
|
|
383 |
# include <nsswitch.h> |
| 384 |
enum nss_status { |
| 385 |
NSS_STATUS_SUCCESS = NS_SUCCESS, |
| 386 |
NSS_STATUS_NOTFOUND = NS_NOTFOUND, |
| 387 |
NSS_STATUS_UNAVAIL = NS_UNAVAIL, |
| 388 |
NSS_STATUS_TRYAGAIN = NS_TRYAGAIN, |
| 389 |
NSS_STATUS_RETURN = NS_RETURN |
| 390 |
}; |
| 391 |
#elif defined __Linux__ |
| 392 |
# include <nss.h> |
| 393 |
#endif |
| 383 |
// For nss_status |
394 |
// For nss_status |
| 384 |
#include <netdb.h> |
395 |
#include <netdb.h> |
| 385 |
// For hostent |
396 |
// For hostent |
|
Lines 1684-1690
Link Here
|
| 1684 |
//---------- |
1695 |
//---------- |
| 1685 |
// Types and Constants |
1696 |
// Types and Constants |
| 1686 |
|
1697 |
|
| 1687 |
const char * k_conf_file = "/etc/nss_mdns.conf"; |
1698 |
const char * k_conf_file = PREFIX"/etc/nss_mdns.conf"; |
| 1688 |
#define CONF_LINE_SIZE 1024 |
1699 |
#define CONF_LINE_SIZE 1024 |
| 1689 |
|
1700 |
|
| 1690 |
const char k_comment_char = '#'; |
1701 |
const char k_comment_char = '#'; |