From a0708428512378aa74a496123800096548ba07fb Mon Sep 17 00:00:00 2001 From: "van Veen, Stephan" Date: Thu, 11 Dec 2025 12:42:01 +0100 Subject: [PATCH] fix: make signal flag restart conditional On QNX with compiler qcc 7.3 SA_RESTART does not exist. --- include/boost/asio/detail/socket_types.hpp | 2 ++ include/boost/asio/signal_set_base.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/boost/asio/detail/socket_types.hpp b/include/boost/asio/detail/socket_types.hpp index 972d4b20b..892c29261 100644 --- a/include/boost/asio/detail/socket_types.hpp +++ b/include/boost/asio/detail/socket_types.hpp @@ -412,7 +412,9 @@ const int max_iov_len = IOV_MAX; // POSIX platforms are not required to define IOV_MAX. const int max_iov_len = 16; # endif +# if defined(SA_RESTART) # define BOOST_ASIO_OS_DEF_SA_RESTART SA_RESTART +# endif # define BOOST_ASIO_OS_DEF_SA_NOCLDSTOP SA_NOCLDSTOP # if defined(SA_NOCLDWAIT) # define BOOST_ASIO_OS_DEF_SA_NOCLDWAIT SA_NOCLDWAIT diff --git a/include/boost/asio/signal_set_base.hpp b/include/boost/asio/signal_set_base.hpp index 0f960cc86..2a45bc405 100644 --- a/include/boost/asio/signal_set_base.hpp +++ b/include/boost/asio/signal_set_base.hpp @@ -63,7 +63,9 @@ class signal_set_base enum class flags : int { none = 0, +#if defined(SA_RESTART) restart = BOOST_ASIO_OS_DEF(SA_RESTART), +#endif no_child_stop = BOOST_ASIO_OS_DEF(SA_NOCLDSTOP), no_child_wait = BOOST_ASIO_OS_DEF(SA_NOCLDWAIT), dont_care = -1