mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
fix: linux error
This commit is contained in:
parent
7571a6fa40
commit
19edc54f6e
@ -33,7 +33,7 @@ error_code_t error_no() noexcept {
|
||||
* https://man7.org/linux/man-pages/man3/errno.3.html
|
||||
*/
|
||||
void error_no(error_code_t const &code) noexcept {
|
||||
errno = (code == 0) ? ENOERR : (int)code.value();
|
||||
errno = (code == 0) ? ENOERR : (int)code;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -76,7 +76,7 @@ result<std::int64_t> conf(info r) noexcept {
|
||||
}
|
||||
auto err = sys::error();
|
||||
log.error("info = ", enum_cast(r), ", error = ", err);
|
||||
return {false, (int)err};
|
||||
return {false, (int)err.code()};
|
||||
}
|
||||
|
||||
} // namespace sys
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user