Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 877003
Collapse All | Expand All

(-)a/src/lib/Makefile.am (-1 / +2 lines)
Lines 9-15 ACLOCAL_AMFLAGS = -I m4 --install Link Here
9
AM_CPPFLAGS = -I$(top_builddir)/include \
9
AM_CPPFLAGS = -I$(top_builddir)/include \
10
              -I$(top_builddir)/src/lib \
10
              -I$(top_builddir)/src/lib \
11
              -I$(top_srcdir)/include \
11
              -I$(top_srcdir)/include \
12
              -I$(top_srcdir)/src/lib
12
              -I$(top_srcdir)/src/lib \
13
              -DSYSCONFDIR=\"$(sysconfdir)\"
13
14
14
lib_LTLIBRARIES = libcares.la
15
lib_LTLIBRARIES = libcares.la
15
16
(-)a/src/lib/Makefile.in (-1 / +1 lines)
Lines 531-537 ACLOCAL_AMFLAGS = -I m4 --install Link Here
531
# might possibly already be installed in the system.
531
# might possibly already be installed in the system.
532
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_builddir)/src/lib \
532
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_builddir)/src/lib \
533
	-I$(top_srcdir)/include -I$(top_srcdir)/src/lib \
533
	-I$(top_srcdir)/include -I$(top_srcdir)/src/lib \
534
	$(am__append_4)
534
	-DSYSCONFDIR=\"$(sysconfdir)\" $(am__append_4)
535
lib_LTLIBRARIES = libcares.la
535
lib_LTLIBRARIES = libcares.la
536
man_MANS = $(MANPAGES)
536
man_MANS = $(MANPAGES)
537
537
(-)a/src/lib/ares_init.c (-2 / +2 lines)
Lines 1756-1762 static int init_by_resolv_conf(ares_channel channel) Link Here
1756
1756
1757
    if ((status == ARES_EOF) && (!channel->lookups)) {
1757
    if ((status == ARES_EOF) && (!channel->lookups)) {
1758
      /* Many systems (Solaris, Linux, BSD's) use nsswitch.conf */
1758
      /* Many systems (Solaris, Linux, BSD's) use nsswitch.conf */
1759
      fp = fopen("/etc/nsswitch.conf", "r");
1759
      fp = fopen(SYSCONFDIR "/nsswitch.conf", "r");
1760
      if (fp) {
1760
      if (fp) {
1761
        while ((status = ares__read_line(fp, &line, &linesize)) ==
1761
        while ((status = ares__read_line(fp, &line, &linesize)) ==
1762
               ARES_SUCCESS)
1762
               ARES_SUCCESS)
Lines 1776-1782 static int init_by_resolv_conf(ares_channel channel) Link Here
1776
          DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n",
1776
          DEBUGF(fprintf(stderr, "fopen() failed with error: %d %s\n",
1777
                         error, strerror(error)));
1777
                         error, strerror(error)));
1778
          DEBUGF(fprintf(stderr, "Error opening file: %s\n",
1778
          DEBUGF(fprintf(stderr, "Error opening file: %s\n",
1779
                         "/etc/nsswitch.conf"));
1779
                         SYSCONFDIR "/nsswitch.conf"));
1780
        }
1780
        }
1781
1781
1782
        /* ignore error, maybe we will get luck in next if clause */
1782
        /* ignore error, maybe we will get luck in next if clause */
(-)a/src/lib/ares_private.h (-3 / +3 lines)
Lines 92-102 W32_FUNC const char *_w32_GetHostsFile (void); Link Here
92
92
93
#else
93
#else
94
94
95
#define PATH_RESOLV_CONF        "/etc/resolv.conf"
95
#define PATH_RESOLV_CONF        SYSCONFDIR "/resolv.conf"
96
#ifdef ETC_INET
96
#ifdef ETC_INET
97
#define PATH_HOSTS              "/etc/inet/hosts"
97
#define PATH_HOSTS              SYSCONFDIR "/inet/hosts"
98
#else
98
#else
99
#define PATH_HOSTS              "/etc/hosts"
99
#define PATH_HOSTS              SYSCONFDIR "/hosts"
100
#endif
100
#endif
101
101
102
#endif
102
#endif

Return to bug 877003