libpcap: fix path to file '/etc/ethers'
authorLeonid Plyushch <leonid.plyushch@gmail.com>
Tue, 12 Sep 2017 10:22:28 +0000 (13:22 +0300)
committerFredrik Fornwall <fredrik@fornwall.net>
Tue, 12 Sep 2017 11:46:55 +0000 (13:46 +0200)
packages/libpcap/build.sh
packages/libpcap/fix-path-etc-ethers.patch [new file with mode: 0644]

index 5eb6d2b..67c4a65 100644 (file)
@@ -1,6 +1,7 @@
 TERMUX_PKG_HOMEPAGE=http://www.tcpdump.org/
 TERMUX_PKG_DESCRIPTION="Library for network traffic capture"
 TERMUX_PKG_VERSION=1.8.1
+TERMUX_PKG_REVISION=1
 # The main tcpdump.org was down 2017-04-12, so we're using a mirror:
 TERMUX_PKG_SRCURL=https://fossies.org/linux/misc/libpcap-${TERMUX_PKG_VERSION}.tar.xz
 TERMUX_PKG_SHA256=8360a05884fc03d1acb8ae40f92eabacf30ef18a4fb4662ac4bc50eab8c37eb0
diff --git a/packages/libpcap/fix-path-etc-ethers.patch b/packages/libpcap/fix-path-etc-ethers.patch
new file mode 100644 (file)
index 0000000..d46eac3
--- /dev/null
@@ -0,0 +1,12 @@
+diff -uNr libpcap-1.8.1/pcap/namedb.h libpcap-1.8.1.mod/pcap/namedb.h
+--- libpcap-1.8.1/pcap/namedb.h        2016-10-26 03:07:59.000000000 +0300
++++ libpcap-1.8.1.mod/pcap/namedb.h    2017-09-12 11:12:26.672992613 +0300
+@@ -53,7 +53,7 @@
+       char name[122];
+ };
+ #ifndef PCAP_ETHERS_FILE
+-#define PCAP_ETHERS_FILE "/etc/ethers"
++#define PCAP_ETHERS_FILE "@TERMUX_PREFIX@/etc/ethers"
+ #endif
+ PCAP_API struct       pcap_etherent *pcap_next_etherent(FILE *);
+ PCAP_API u_char *pcap_ether_hostton(const char*);