mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 17:28:29 +00:00
With SSL enabled and NOMINMAX not defined, there is a conflict with 'max', which this fixes (#1334)
Co-authored-by: iamttaM <9880090+oculusbytes@users.noreply.github.com>
This commit is contained in:
parent
b1cc24b795
commit
462884bebb
1 changed files with 1 additions and 1 deletions
|
@ -7298,7 +7298,7 @@ inline ssize_t SSLSocketStream::read(char *ptr, size_t size) {
|
||||||
inline ssize_t SSLSocketStream::write(const char *ptr, size_t size) {
|
inline ssize_t SSLSocketStream::write(const char *ptr, size_t size) {
|
||||||
if (is_writable()) {
|
if (is_writable()) {
|
||||||
auto handle_size = static_cast<int>(
|
auto handle_size = static_cast<int>(
|
||||||
std::min<size_t>(size, std::numeric_limits<int>::max()));
|
std::min<size_t>(size, (std::numeric_limits<int>::max)()));
|
||||||
|
|
||||||
auto ret = SSL_write(ssl_, ptr, static_cast<int>(handle_size));
|
auto ret = SSL_write(ssl_, ptr, static_cast<int>(handle_size));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue