$OpenBSD: patch-libpcap_pcap-bpf_c,v 1.2 2016/01/07 13:23:47 giovanni Exp $
--- libpcap/pcap-bpf.c.orig	Fri May  1 22:24:47 2015
+++ libpcap/pcap-bpf.c	Tue Dec 29 10:47:48 2015
@@ -2319,7 +2319,7 @@ monitor_mode(pcap_t *p, int set)
 	struct pcap_bpf *pb = p->priv;
 	int sock;
 	struct ifmediareq req;
-	int *media_list;
+	uint64_t *media_list;
 	int i;
 	int can_do;
 	struct ifreq ifr;
@@ -2376,7 +2376,7 @@ monitor_mode(pcap_t *p, int set)
 	 * Allocate a buffer to hold all the media types, and
 	 * get the media types.
 	 */
-	media_list = malloc(req.ifm_count * sizeof(int));
+	media_list = malloc(req.ifm_count * sizeof(uint64_t));
 	if (media_list == NULL) {
 		snprintf(p->errbuf, PCAP_ERRBUF_SIZE, "malloc: %s",
 		    pcap_strerror(errno));
