1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00

esp32: use strerror instead of gai_strerror

This commit is contained in:
Jackson Ming Hu 2019-07-01 14:53:54 +01:00 committed by Andy Green
parent 9e75e7b780
commit 310bd7d5d4

View file

@ -398,8 +398,11 @@ lws_create_adopt_udp(struct lws_vhost *vhost, int port, int flags,
lws_snprintf(buf, sizeof(buf), "%u", port);
n = getaddrinfo(NULL, buf, &h, &r);
if (n) {
lwsl_info("%s: getaddrinfo error: %s\n", __func__,
gai_strerror(n));
#ifndef LWS_WITH_ESP32
lwsl_info("%s: getaddrinfo error: %s\n", __func__, gai_strerror(n));
#else
lwsl_info("%s: getaddrinfo error: %s\n", __func__, strerror(n));
#endif
goto bail;
}