feat(sockutls): Add initial support for socket helpers

This commit is contained in:
David Cermak
2024-10-08 21:27:11 +02:00
parent 72f4f7c7a3
commit 31f57ad067
33 changed files with 1186 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdio.h>
#include "gai_strerror.h"
_Thread_local char gai_strerror_string[32];
const char *gai_strerror(int ecode)
{
if (snprintf(gai_strerror_string, sizeof(gai_strerror_string), "EAI error:%d", ecode) < 0) {
return "gai_strerror() failed";
}
return gai_strerror_string;
}