From 1e9bcbb54b9e593c79236da7fc82cb5435aec757 Mon Sep 17 00:00:00 2001 From: Lucas Alves Date: Mon, 6 Apr 2026 21:57:32 -0300 Subject: [PATCH] Add asio::basic_errors::not_supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As noted by Vinícius dos Santos¹, ENOTSUP and EOPNOTSUPP may alias on some systems. That's the case for Linux and FreeBSD. On Systems where ENOTSUP and EOPNOTSUPP have the same errno values, one might inadvertently catch EOPNOTSUPP when a composed operation throws ENOTSUP. There's nothing ASIO can do here, so we don't try to. Reference: ¹https://sourceforge.net/p/asio/mailman/message/58710157/ --- include/asio/error.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/asio/error.hpp b/include/asio/error.hpp index 56c1ad4006..acd17d14da 100644 --- a/include/asio/error.hpp +++ b/include/asio/error.hpp @@ -162,6 +162,9 @@ enum basic_errors /// Socket operation on non-socket. not_socket = ASIO_SOCKET_ERROR(ENOTSOCK), + // Not supported. + not_supported = ASIO_NATIVE_ERROR(ENOTSUP), + /// Operation cancelled. operation_aborted = ASIO_WIN_OR_POSIX( ASIO_NATIVE_ERROR(ERROR_OPERATION_ABORTED),