diff --git a/include/spdlog/details/tcp_client_unix.h b/include/spdlog/details/tcp_client_unix.h index 9364eda5..945ef2df 100644 --- a/include/spdlog/details/tcp_client_unix.h +++ b/include/spdlog/details/tcp_client_unix.h @@ -61,9 +61,9 @@ public: int last_errno = 0; for (auto *rp = addrinfo_result; rp != nullptr; rp = rp->ai_next) { #if defined(SOCK_CLOEXEC) - const int flags = SOCK_CLOEXEC; + constexpr int flags = SOCK_CLOEXEC; #else - const int flags = 0; + constexpr int flags = 0; #endif socket_ = ::socket(rp->ai_family, rp->ai_socktype | flags, rp->ai_protocol); if (socket_ == -1) {