Commit 732d0db6 authored by Alexandre Julliard's avatar Alexandre Julliard

wpcap: Avoid deprecated pcap_lookupdev().

parent 0f37157b
......@@ -202,8 +202,18 @@ int CDECL wine_pcap_list_datalinks(pcap_t *p, int **dlt_buffer)
char* CDECL wine_pcap_lookupdev(char *errbuf)
{
static char *ret;
pcap_if_t *devs;
TRACE("(%p)\n", errbuf);
return pcap_lookupdev(errbuf);
if (!ret)
{
if (pcap_findalldevs( &devs, errbuf ) == -1) return NULL;
if (!devs) return NULL;
if ((ret = heap_alloc( strlen(devs->name) + 1 ))) strcpy( ret, devs->name );
pcap_freealldevs( devs );
}
return ret;
}
int CDECL wine_pcap_lookupnet(const char *device, unsigned int *netp, unsigned int *maskp,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment