[Samuel Thibault] > But better also enable the linux case at line 214: GNU/Hurd does have > /proc/$pid/cmdline.
Ah, good point. I did not notice this. Attached is an updated patch. > Please rather fix the ifdef into > > > +-#elif (defined(__APPLE__) && defined(__MACH__)) && !TARGET_OS_IOS > > (no triple-'_', and && instead of ||), just like in the rest of the > source code. OK. Here is an updated patch, not tested on anything Apple based. :) > Indeed, could you also submit them upstream? Sadly no, I lack the required free space on a machine with github access. -- Happy hacking Petter Reinholdtsen
Description: Fixed build problems on GNU Hurd. Disabled use of not implemented SA_NOCLDWAIT. Corrected return value of fallback cmd() implementation. Switched to Linux version of env() instead of trying to use MacOSX edition. Author: Petter Reinholdtsen <p...@debian.org> Forwarded: no Last-Update: 2025-05-01 --- Index: boost1.88-1.88.0/libs/asio/include/boost/asio/detail/socket_types.hpp =================================================================== --- boost1.88-1.88.0.orig/libs/asio/include/boost/asio/detail/socket_types.hpp 2025-05-03 18:58:58.000000000 +0200 +++ boost1.88-1.88.0/libs/asio/include/boost/asio/detail/socket_types.hpp 2025-05-03 18:58:58.000000000 +0200 @@ -414,7 +414,9 @@ # 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 /* defined(SA_NOCLDWAIT) */ #endif const int custom_socket_option_level = 0xA5100000; const int enable_connection_aborted_option = 1; Index: boost1.88-1.88.0/libs/asio/include/boost/asio/signal_set_base.hpp =================================================================== --- boost1.88-1.88.0.orig/libs/asio/include/boost/asio/signal_set_base.hpp 2025-05-03 18:58:58.000000000 +0200 +++ boost1.88-1.88.0/libs/asio/include/boost/asio/signal_set_base.hpp 2025-05-03 18:58:58.000000000 +0200 @@ -65,7 +65,9 @@ none = 0, restart = BOOST_ASIO_OS_DEF(SA_RESTART), no_child_stop = BOOST_ASIO_OS_DEF(SA_NOCLDSTOP), +#if defined(SA_NOCLDWAIT) no_child_wait = BOOST_ASIO_OS_DEF(SA_NOCLDWAIT), +#endif /* defined(SA_NOCLDWAIT) */ dont_care = -1 }; Index: boost1.88-1.88.0/libs/process/src/ext/cmd.cpp =================================================================== --- boost1.88-1.88.0.orig/libs/process/src/ext/cmd.cpp 2025-05-03 18:58:58.000000000 +0200 +++ boost1.88-1.88.0/libs/process/src/ext/cmd.cpp 2025-05-03 19:00:39.000000000 +0200 @@ -31,7 +31,7 @@ #endif #endif -#if (defined(__linux__) || defined(__ANDROID__)) +#if (defined(__linux__) || defined(__ANDROID__) || defined(__gnu_hurd__)) #include <cstdio> #endif @@ -211,7 +211,7 @@ return make_cmd_shell_::make(std::move(procargs), argc, argv.release(), fr_func); } -#elif (defined(__linux__) || defined(__ANDROID__)) +#elif (defined(__linux__) || defined(__ANDROID__) || defined(__gnu_hurd__)) shell cmd(boost::process::v2::pid_type pid, error_code & ec) { @@ -403,10 +403,10 @@ } #else -filesystem::path cmd(boost::process::v2::pid_type, error_code & ec) +shell cmd(boost::process::v2::pid_type, error_code & ec) { BOOST_PROCESS_V2_ASSIGN_EC(ec, ENOTSUP, system_category()); - return ""; + return {}; } #endif Index: boost1.88-1.88.0/libs/process/src/ext/env.cpp =================================================================== --- boost1.88-1.88.0.orig/libs/process/src/ext/env.cpp 2025-05-03 18:58:58.000000000 +0200 +++ boost1.88-1.88.0/libs/process/src/ext/env.cpp 2025-05-04 05:49:09.000000000 +0200 @@ -246,7 +246,7 @@ return {}; } -#elif (defined(__APPLE___) || defined(__MACH__)) && !TARGET_OS_IOS +#elif (defined(__APPLE__) && defined(__MACH__)) && !TARGET_OS_IOS env_view env(boost::process::v2::pid_type pid, error_code & ec) { @@ -309,7 +309,7 @@ return ev; } -#elif (defined(__linux__) || defined(__ANDROID__)) +#elif (defined(__linux__) || defined(__ANDROID__)) || defined(__gnu_hurd__) env_view env(boost::process::v2::pid_type pid, error_code & ec) {