diff --git a/examples/benchmark/tls_bench.c b/examples/benchmark/tls_bench.c index ab3766ca8..be68e2c7c 100644 --- a/examples/benchmark/tls_bench.c +++ b/examples/benchmark/tls_bench.c @@ -22,13 +22,14 @@ /* Example gcc build statement -gcc -lwolfssl -lpthread -o tls_bench tls_bench.c -./tls_bench + + gcc -lwolfssl -lpthread -o tls_bench tls_bench.c + ./tls_bench Or -#include -bench_tls(args); + #include + bench_tls(args); */ diff --git a/examples/echoclient/echoclient.c b/examples/echoclient/echoclient.c index ff67a2bc9..6d1a234c4 100644 --- a/examples/echoclient/echoclient.c +++ b/examples/echoclient/echoclient.c @@ -99,7 +99,6 @@ void echoclient_test(void* args) argv = ((func_args*)args)->argv; if (argc >= 2) { -fprintf(stderr,"fopen(%s,r)\n",argv[1]); fin = fopen(argv[1], "r"); inCreated = 1; } diff --git a/src/wolfio.c b/src/wolfio.c index a714fd6c5..c1cd7b7df 100644 --- a/src/wolfio.c +++ b/src/wolfio.c @@ -918,6 +918,11 @@ int wolfIO_TcpConnect(SOCKET_T* sockfd, const char* ip, word16 port, int to_sec) } #else #if (__GLIBC__ >= 2) && defined(__USE_MISC) && !defined(SINGLE_THREADED) + /* 2048 is a magic number that empirically works. the header and + * documentation provide no guidance on appropriate buffer size other than + * "if buf is too small, the functions will return ERANGE, and the call + * should be retried with a larger buffer." + */ ghbn_r_buf = (char *)XMALLOC(2048, NULL, DYNAMIC_TYPE_TMP_BUFFER); if (ghbn_r_buf != NULL) { gethostbyname_r(ip, &entry_buf, ghbn_r_buf, 2048, &entry, &ghbn_r_errno); diff --git a/tests/api.c b/tests/api.c index 447135e2f..faff69bca 100644 --- a/tests/api.c +++ b/tests/api.c @@ -2671,12 +2671,12 @@ static void test_wolfSSL_CTX_ticket_API(void) static void test_wolfSSL_set_minmax_proto_version(void) { #ifdef OPENSSL_EXTRA -WOLFSSL_CTX *ctx; -WOLFSSL *ssl; -int ret; -(void)ret; -(void)ssl; -printf(testingFmt, "test_wolfSSL_set_minmax_proto_version"); + WOLFSSL_CTX *ctx; + WOLFSSL *ssl; + int ret; + (void)ret; + (void)ssl; + printf(testingFmt, "test_wolfSSL_set_minmax_proto_version"); #ifndef NO_WOLFSSL_CLIENT AssertNotNull(ctx = wolfSSL_CTX_new(wolfSSLv23_client_method()));