diff --git a/lib/client.c b/lib/client.c index b6236a2b80..dc6dacb94f 100644 --- a/lib/client.c +++ b/lib/client.c @@ -850,7 +850,7 @@ libwebsockets_generate_client_handshake(struct libwebsocket_context *context, key_b64[39] = '\0'; /* enforce composed length below buf sizeof */ n = sprintf(buf, "%s258EAFA5-E914-47DA-95CA-C5AB0DC85B11", key_b64); - SHA1((unsigned char *)buf, n, (unsigned char *)hash); + ws_SHA1((unsigned char *)buf, n, (unsigned char *)hash); lws_b64_encode_string(hash, 20, wsi->u.hdr.ah->initial_handshake_hash_base64, diff --git a/lib/private-libwebsockets.h b/lib/private-libwebsockets.h index d1ca6d2135..bb6f64544c 100644 --- a/lib/private-libwebsockets.h +++ b/lib/private-libwebsockets.h @@ -96,7 +96,7 @@ #include #include unsigned char * -SHA1(const unsigned char *d, size_t n, unsigned char *md); +ws_SHA1(const unsigned char *d, size_t n, unsigned char *md); #else #include #include @@ -532,7 +532,7 @@ extern int interface_to_sa(const char *ifname, #ifndef LWS_OPENSSL_SUPPORT unsigned char * -SHA1(const unsigned char *d, size_t n, unsigned char *md); +ws_SHA1(const unsigned char *d, size_t n, unsigned char *md); #else diff --git a/lib/server-handshake.c b/lib/server-handshake.c index 53da4e7ad5..536ce8ccb4 100644 --- a/lib/server-handshake.c +++ b/lib/server-handshake.c @@ -64,7 +64,7 @@ handshake_0405(struct libwebsocket_context *context, struct libwebsocket *wsi) "%s258EAFA5-E914-47DA-95CA-C5AB0DC85B11", lws_hdr_simple_ptr(wsi, WSI_TOKEN_KEY)); - SHA1(context->service_buffer, n, hash); + ws_SHA1(context->service_buffer, n, hash); accept_len = lws_b64_encode_string((char *)hash, 20, (char *)context->service_buffer, diff --git a/lib/sha-1.c b/lib/sha-1.c index 6020c227e0..67b17e1eb2 100644 --- a/lib/sha-1.c +++ b/lib/sha-1.c @@ -313,7 +313,7 @@ sha1_result(struct sha1_ctxt *ctxt, void *digest0) */ unsigned char * -SHA1(const unsigned char *d, size_t n, unsigned char *md) +ws_SHA1(const unsigned char *d, size_t n, unsigned char *md) { struct sha1_ctxt ctx; diff --git a/test-server/test-ping.c b/test-server/test-ping.c index 098981cf7a..155ac7dd30 100644 --- a/test-server/test-ping.c +++ b/test-server/test-ping.c @@ -338,7 +338,7 @@ int main(int argc, char **argv) char ip[30]; #ifndef WIN32 struct sigaction sa; - struct winsize w; + // struct winsize w; #endif struct timeval tv; unsigned long oldus = 0; @@ -420,10 +420,10 @@ int main(int argc, char **argv) } #ifndef WIN32 - if (isatty(STDOUT_FILENO)) - if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1) - if (w.ws_col > 0) - screen_width = w.ws_col; + // if (isatty(STDOUT_FILENO)) + // if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) != -1) + // if (w.ws_col > 0) + // screen_width = w.ws_col; #endif info.port = CONTEXT_PORT_NO_LISTEN;