[PATCH v24 02/24] net/pcap: fix build on Windows

Stephen Hemminger
2026-04-16T18:47:49Z

The log messages in the pcap OS dependent code for Windows
was never converted during the last release.

It looks like the osdep part of pcap was not being built.
Building requires have libpcap for Windows built which is not
part of the CI infrastructure.

Fixes: 2b843cac232e ("drivers: use per line logging in helpers")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/pcap/pcap_osdep_windows.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/pcap/pcap_osdep_windows.c b/drivers/net/pcap/pcap_osdep_windows.c
index 1d398dc7ed..0965c2f5c9 100644
--- a/drivers/net/pcap/pcap_osdep_windows.c
+++ b/drivers/net/pcap/pcap_osdep_windows.c
@@ -53,7 +53,7 @@ osdep_iface_index_get(const char *device_name)

ret = GetAdapterIndex(adapter_name, &index);
if (ret != NO_ERROR) {
- PMD_LOG(ERR, "GetAdapterIndex(%S) = %lu\n", adapter_name, ret);
+ PMD_LOG(ERR, "GetAdapterIndex(%S) = %lu", adapter_name, ret);
return -1;
}

@@ -75,20 +75,20 @@ osdep_iface_mac_get(const char *device_name, struct rte_ether_addr *mac)

sys_ret = GetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, &size);
if (sys_ret != ERROR_BUFFER_OVERFLOW) {
- PMD_LOG(ERR, "GetAdapterAddresses() = %lu, expected %lu\n",
+ PMD_LOG(ERR, "GetAdapterAddresses() = %lu, expected %lu",
sys_ret, ERROR_BUFFER_OVERFLOW);
return -1;
}

info = (IP_ADAPTER_ADDRESSES *)malloc(size);
if (info == NULL) {
- PMD_LOG(ERR, "Cannot allocate adapter address info\n");
+ PMD_LOG(ERR, "Cannot allocate adapter address info");
return -1;
}

sys_ret = GetAdaptersAddresses(AF_UNSPEC, 0, NULL, info, &size);
if (sys_ret != ERROR_SUCCESS) {
- PMD_LOG(ERR, "GetAdapterAddresses() = %lu\n", sys_ret);
+ PMD_LOG(ERR, "GetAdapterAddresses() = %lu", sys_ret);
free(info);
return -1;
}
--
2.53.0