diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f22ec77..f495087b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ if (CMAKE_VERSION VERSION_LESS "3.0") cmake_minimum_required(VERSION 2.8) else() - cmake_minimum_required(VERSION 3.6) + cmake_minimum_required(VERSION 3.10) endif() project(GmSSL C) diff --git a/include/gmssl/error.h b/include/gmssl/error.h index 497501e6..3185a688 100644 --- a/include/gmssl/error.h +++ b/include/gmssl/error.h @@ -30,7 +30,9 @@ extern "C" { +#ifndef DEBUG #define DEBUG 1 +#endif #define warning_print() \ do { if (DEBUG) fprintf(stderr, "%s:%d:%s():\n",__FILE__, __LINE__, __FUNCTION__); } while (0) diff --git a/src/tls.c b/src/tls.c index d89dc1ee..31f3ba28 100644 --- a/src/tls.c +++ b/src/tls.c @@ -2321,7 +2321,7 @@ int tls_set_socket(TLS_CONNECT *conn, tls_socket_t sock) { int flags = 0; #ifdef WIN32 - if( ioctlsocket(sock, FIONBIO, &flags) != 0) { + if( ioctlsocket(sock, FIONBIO, (u_long*)&flags) != 0) { error_puts("socket in non-blocking mode"); //nginx will pass a socket in non-blocking mode //return -1;