Commit cf006b87 authored by Joseph Noir's avatar Joseph Noir

Fix include and cast with socket to int conversion

parent c59d29be
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#pragma once #pragma once
#include <cstddef> #include <cstdint>
#include "caf/config.hpp" #include "caf/config.hpp"
...@@ -30,7 +30,7 @@ namespace network { ...@@ -30,7 +30,7 @@ namespace network {
using native_socket = size_t; using native_socket = size_t;
constexpr native_socket invalid_native_socket = static_cast<native_socket>(-1); constexpr native_socket invalid_native_socket = static_cast<native_socket>(-1);
inline int64_t int64_from_native_socket(native_socket sock) { inline int64_t int64_from_native_socket(native_socket sock) {
return sock == invalid_native_socket ? -1 : static_cast<uint64_t>(sock); return sock == invalid_native_socket ? -1 : static_cast<int64_t>(sock);
} }
#else #else
using native_socket = int; using native_socket = int;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment