From: Guy Harris Date: Sat, 4 Jul 2009 21:17:36 +0000 (-0700) Subject: Squelch some compile warnings with older Linux kernels. X-Git-Tag: libpcap-1.1.0~127 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/8844f5bad80968a16bedae8e9f0b47bfe1a2778d Squelch some compile warnings with older Linux kernels. --- diff --git a/pcap-linux.c b/pcap-linux.c index 0c6cf3d5..6fe7a24f 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -3229,7 +3229,7 @@ enter_rfmon_mode_wext(pcap_t *handle, int sock_fd, const char *device) strncpy(ireq.ifr_ifrn.ifrn_name, device, sizeof ireq.ifr_ifrn.ifrn_name); ireq.ifr_ifrn.ifrn_name[sizeof ireq.ifr_ifrn.ifrn_name - 1] = 0; - ireq.u.data.pointer = args; + ireq.u.data.pointer = (void *)args; ireq.u.data.length = 0; ireq.u.data.flags = 0; if (ioctl(sock_fd, SIOCGIWPRIV, &ireq) != -1) { @@ -3259,7 +3259,7 @@ enter_rfmon_mode_wext(pcap_t *handle, int sock_fd, const char *device) "malloc: %s", pcap_strerror(errno)); return PCAP_ERROR; } - ireq.u.data.pointer = priv; + ireq.u.data.pointer = (void *)priv; if (ioctl(sock_fd, SIOCGIWPRIV, &ireq) == -1) { snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "%s: SIOCGIWPRIV: %s", device, pcap_strerror(errno));