diff --git a/include/boost/asio/detail/socket_types.hpp b/include/boost/asio/detail/socket_types.hpp index adc36483f..1ebd1bb2f 100644 --- a/include/boost/asio/detail/socket_types.hpp +++ b/include/boost/asio/detail/socket_types.hpp @@ -414,7 +414,9 @@ const int max_iov_len = 16; # endif # define BOOST_ASIO_OS_DEF_SA_RESTART SA_RESTART # define BOOST_ASIO_OS_DEF_SA_NOCLDSTOP SA_NOCLDSTOP -# define BOOST_ASIO_OS_DEF_SA_NOCLDWAIT SA_NOCLDWAIT +# if defined(SA_NOCLDWAIT) +# define BOOST_ASIO_OS_DEF_SA_NOCLDWAIT SA_NOCLDWAIT +# endif #endif const int custom_socket_option_level = 0xA5100000; const int enable_connection_aborted_option = 1; diff --git a/include/boost/asio/signal_set_base.hpp b/include/boost/asio/signal_set_base.hpp index 0f960cc86..5c3a2348b 100644 --- a/include/boost/asio/signal_set_base.hpp +++ b/include/boost/asio/signal_set_base.hpp @@ -65,7 +65,9 @@ class signal_set_base none = 0, restart = BOOST_ASIO_OS_DEF(SA_RESTART), no_child_stop = BOOST_ASIO_OS_DEF(SA_NOCLDSTOP), +#if defined(BOOST_ASIO_OS_DEF_SA_NOCLDWAIT) no_child_wait = BOOST_ASIO_OS_DEF(SA_NOCLDWAIT), +#endif dont_care = -1 };