freebsd-ports/net-mgmt/collectd5/files/patch-src__dns.c
Joseph Mingrone ff55205c69 net-mgmt/collectd5: Update to version 5.7.1.
Other Changes:
  - Remove unnecessary global BUILD_DEPENDS, LIB_DEPENDS and RUN_DEPENDS.
  - Redo patches to fix portlint warnings.
  - Fix linked library errors reported by poudriere.

Remaining issue:
  - When the XMMS option is selected, xmms.so is linked to libraries in
    devel/glib12 and x11-toolkits/gtk12, but adding
    XMMS_USE=GNOME=glib12,gtk12 causes a build error.

PR:	216670
Submitted by:	ports@bsdserwis.com (maintainer)
Approved by:	swills (mentor)
Differential Revision:	https://reviews.freebsd.org/D9444
2017-02-09 00:44:42 +00:00

18 lines
548 B
C

--- src/dns.c.orig 2017-01-23 07:53:57 UTC
+++ src/dns.c
@@ -198,6 +198,15 @@ static int dns_run_pcap_loop(void) {
pthread_sigmask(SIG_SETMASK, &sigmask, NULL);
}
+ /* Check for pcap_device, if needed */
+#ifdef __sparc64__
+ if (pcap_device == NULL)
+ {
+ ERROR ("dns plugin: Interface required");
+ return (NULL);
+ }
+#endif
+
/* Passing `pcap_device == NULL' is okay and the same as passign "any" */
DEBUG("dns plugin: Creating PCAP object..");
pcap_obj = pcap_open_live((pcap_device != NULL) ? pcap_device : "any",