diff --git a/src/ext/cwd.cpp b/src/ext/cwd.cpp index 2a3ea8859..73650824d 100644 --- a/src/ext/cwd.cpp +++ b/src/ext/cwd.cpp @@ -31,7 +31,7 @@ #endif #endif -#if (defined(BOOST_PROCESS_V2_WINDOWS) || defined(__linux__) || defined(__ANDROID__) || defined(__sun)) +#if (defined(BOOST_PROCESS_V2_WINDOWS) || defined(__linux__) || defined(__ANDROID__) || defined(__gnu_hurd__) || defined(__sun)) #include #endif @@ -115,11 +115,11 @@ filesystem::path cwd(boost::process::v2::pid_type pid, error_code & ec) return ""; } -#elif (defined(__linux__) || defined(__ANDROID__) || defined(__sun)) +#elif (defined(__linux__) || defined(__ANDROID__) || defined(__gnu_hurd__) || defined(__sun)) filesystem::path cwd(boost::process::v2::pid_type pid, error_code & ec) { -#if (defined(__linux__) || defined(__ANDROID__)) +#if (defined(__linux__) || defined(__ANDROID__) || defined(__gnu_hurd__)) return filesystem::canonical( filesystem::path("/proc") / std::to_string(pid) / "cwd", ec ); diff --git a/src/ext/exe.cpp b/src/ext/exe.cpp index 645724811..28fb1accd 100644 --- a/src/ext/exe.cpp +++ b/src/ext/exe.cpp @@ -32,7 +32,7 @@ #endif #endif -#if (defined(BOOST_PROCESS_V2_WINDOWS) || defined(__linux__) || defined(__ANDROID__) || defined(__sun)) +#if (defined(BOOST_PROCESS_V2_WINDOWS) || defined(__linux__) || defined(__ANDROID__) || defined(__gnu_hurd__) || defined(__sun)) #include #endif @@ -132,11 +132,11 @@ filesystem::path exe(boost::process::v2::pid_type pid, error_code & ec) return ""; } -#elif (defined(__linux__) || defined(__ANDROID__) || defined(__sun)) +#elif (defined(__linux__) || defined(__ANDROID__) || defined(__gnu_hurd__) || defined(__sun)) filesystem::path exe(boost::process::v2::pid_type pid, error_code & ec) { -#if (defined(__linux__) || defined(__ANDROID__)) +#if (defined(__linux__) || defined(__ANDROID__) || defined(__gnu_hurd__)) return filesystem::canonical( filesystem::path("/proc") / std::to_string(pid) / "exe", ec );