diff -rBu libpcap-1.1.1-orig//Makefile.in libpcap-1.1.1/Makefile.in --- libpcap-1.1.1-orig//Makefile.in 2010-04-05 19:54:05.000000000 +0200 +++ libpcap-1.1.1/Makefile.in 2011-09-05 01:35:55.099410919 +0200 @@ -35,6 +35,8 @@ libdir = @libdir@ # Pathname of directory to install the man pages mandir = @mandir@ +# Pathname of directory to install and look for config files +sysconfdir = @sysconfdir@ # VPATH srcdir = @srcdir@ @@ -48,7 +50,7 @@ CC = @CC@ CCOPT = @V_CCOPT@ INCLS = -I. @V_INCLS@ -DEFS = @DEFS@ @V_DEFS@ +DEFS = @DEFS@ @V_DEFS@ -DSYSCONFDIR=\"$(sysconfdir)\" ADDLOBJS = @ADDLOBJS@ ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@ LIBS = @LIBS@ diff -rBu libpcap-1.1.1-orig//nametoaddr.c libpcap-1.1.1/nametoaddr.c --- libpcap-1.1.1-orig//nametoaddr.c 2010-03-12 02:56:54.000000000 +0100 +++ libpcap-1.1.1/nametoaddr.c 2011-09-05 01:35:30.719290021 +0200 @@ -192,8 +192,8 @@ else /* Can't handle ambiguous names that refer to different port numbers. */ - warning("ambiguous port %s in /etc/services", - name); + warning("ambiguous port %s in %s/services", + name, SYSCONFDIR); #endif } return 1; diff -rBu libpcap-1.1.1-orig//pcap/namedb.h libpcap-1.1.1/pcap/namedb.h --- libpcap-1.1.1-orig//pcap/namedb.h 2010-03-12 02:56:54.000000000 +0100 +++ libpcap-1.1.1/pcap/namedb.h 2011-09-05 01:36:31.843593123 +0200 @@ -52,7 +52,7 @@ char name[122]; }; #ifndef PCAP_ETHERS_FILE -#define PCAP_ETHERS_FILE "/etc/ethers" +#define PCAP_ETHERS_FILE SYSCONFDIR "/ethers" #endif struct pcap_etherent *pcap_next_etherent(FILE *); u_char *pcap_ether_hostton(const char*); diff -rBu libpcap-1.1.1-orig//pcap-sita.c libpcap-1.1.1/pcap-sita.c --- libpcap-1.1.1-orig//pcap-sita.c 2010-03-12 02:56:54.000000000 +0100 +++ libpcap-1.1.1/pcap-sita.c 2011-09-05 01:41:27.737060369 +0200 @@ -263,8 +263,8 @@ unit_t *u; empty_unit_table(); - if ((fp = fopen("/etc/hosts", "r")) == NULL) { /* try to open the hosts file and if it fails */ - snprintf(errbuf, PCAP_ERRBUF_SIZE, "Cannot open '/etc/hosts' for reading."); /* return the nohostsfile error response */ + if ((fp = fopen(SYSCONFDIR "hosts", "r")) == NULL) { /* try to open the hosts file and if it fails */ + snprintf(errbuf, PCAP_ERRBUF_SIZE, "Cannot open '%s/hosts' for reading.", SYSCONFDIR); /* return the nohostsfile error response */ return -1; } while (fgets(buf, MAX_LINE_SIZE-1, fp)) { /* while looping over the file */ @@ -287,7 +287,7 @@ geoslot = *(ptr2 + 5) - '0'; /* and geo-slot number */ if (chassis < 1 || chassis > MAX_CHASSIS || geoslot < 1 || geoslot > MAX_GEOSLOT) { /* if the chassis and/or slot numbers appear to be bad... */ - snprintf(errbuf, PCAP_ERRBUF_SIZE, "Invalid ACN name in '/etc/hosts'."); /* warn the user */ + snprintf(errbuf, PCAP_ERRBUF_SIZE, "Invalid ACN name in '%s/hosts'.", SYSCONFDIR); /* warn the user */ continue; /* and ignore the entry */ } if ((ptr2 = (char *)malloc(strlen(ptr) + 1)) == NULL) {