pci: fix build on FreeBSD
authorThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 30 Jul 2015 13:41:33 +0000 (15:41 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 3 Aug 2015 15:50:07 +0000 (17:50 +0200)
commit3fc36d76ab26c8bd669bc06ee98abffa282aca15
tree3713a09b708912c2c0c5a86a8ee11a31bbcf7129
parent87b1faa0e0de4c2612bb36cd271354410b4d6689
pci: fix build on FreeBSD

Build log:
lib/librte_eal/bsdapp/eal/eal_pci.c:462:9: error:
incompatible integer to pointer conversion passing 'u_int32_t'
(aka 'unsigned int') to parameter of type 'void *'

It is fixed by passing the pointer of pi.pi_data to memcpy.

By the way, it seems strange that pi_data is initialized twice:
.pi_data = *(u_int32_t *)buf
memcpy(&pi.pi_data, buf, len);

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_eal/bsdapp/eal/eal_pci.c