esphome-component-ping icon indicating copy to clipboard operation
esphome-component-ping copied to clipboard

Compilation error for inet6_ntoa in ping_esp32.h

Open mdiazfer opened this issue 1 year ago • 1 comments

Thanks for this piece of code. Really useful for network troubleshooting.

The first try to compile the code, it raised an error in file ping_esp32.h due to the unknown inet6_ntoa structure in line 105.

I have ESPHOME 2024.8.3 version.

inet6_ntoa is related to the IPv6 stack. If you don't need IPv6, which is my case, the fix is trivial. Just apply this patch:

ping_esp32.h
105c105,107
<     } else {
---
>     } 
> #if CONFIG_LWIP_IPV6
>     else {
107a110
> #endif

That was enough in my case to compile the code.

mdiazfer avatar Nov 17 '24 10:11 mdiazfer

Not sure if this issue is still valid. I built it successfully for a ESP32 this week on the latest version. I am also IPv4 only.

sbluhm avatar Jan 18 '25 10:01 sbluhm

please give v1.2.0 a try.

trombik avatar Jul 27 '25 01:07 trombik