diff options
Diffstat (limited to 'devel/boost-libs/files')
-rw-r--r-- | devel/boost-libs/files/patch-AT_NO_AUTOMOUNT | 36 | ||||
-rw-r--r-- | devel/boost-libs/files/patch-boost_dll_detail_posix_program__location__impl.hpp | 25 |
2 files changed, 58 insertions, 3 deletions
diff --git a/devel/boost-libs/files/patch-AT_NO_AUTOMOUNT b/devel/boost-libs/files/patch-AT_NO_AUTOMOUNT new file mode 100644 index 000000000000..9db1dbe7d9ef --- /dev/null +++ b/devel/boost-libs/files/patch-AT_NO_AUTOMOUNT @@ -0,0 +1,36 @@ +The AT_NO_AUTOMOUNT seems to be a Linux-only thing... + + -mi + +--- libs/filesystem/config/has_posix_at_apis.cpp 2025-05-29 12:45:36.456840000 -0400 ++++ libs/filesystem/config/has_posix_at_apis.cpp 2025-05-29 18:17:30.866425000 -0400 +@@ -23,5 +23,5 @@ + + struct stat st; +- res |= fstatat(fd1, "y", &st, AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW); ++ res |= fstatat(fd1, "y", &st, AT_SYMLINK_NOFOLLOW); + + res |= linkat(fd1, "y", fd1, "z", 0); +--- libs/filesystem/src/operations.cpp 2025-05-29 18:20:19.260975000 -0400 ++++ libs/filesystem/src/operations.cpp 2025-05-29 20:12:31.002264000 -0400 +@@ -355,5 +355,5 @@ + { + struct ::stat st; +- flags &= AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW; ++ flags &= AT_EMPTY_PATH | AT_SYMLINK_NOFOLLOW; + int res = ::fstatat(dirfd, path, &st, flags); + if (BOOST_LIKELY(res == 0)) +@@ -508,5 +508,5 @@ + #elif defined(BOOST_FILESYSTEM_HAS_POSIX_AT_APIS) + struct ::stat path_stat; +- int err = ::fstatat(basedir_fd, p.c_str(), &path_stat, AT_NO_AUTOMOUNT); ++ int err = ::fstatat(basedir_fd, p.c_str(), &path_stat, 0); + #else + struct ::stat path_stat; +@@ -569,5 +569,5 @@ + #elif defined(BOOST_FILESYSTEM_HAS_POSIX_AT_APIS) + struct ::stat path_stat; +- int err = ::fstatat(basedir_fd, p.c_str(), &path_stat, AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT); ++ int err = ::fstatat(basedir_fd, p.c_str(), &path_stat, AT_SYMLINK_NOFOLLOW); + #else + struct ::stat path_stat; diff --git a/devel/boost-libs/files/patch-boost_dll_detail_posix_program__location__impl.hpp b/devel/boost-libs/files/patch-boost_dll_detail_posix_program__location__impl.hpp index 4afbd9cc2be5..85d01b6cf416 100644 --- a/devel/boost-libs/files/patch-boost_dll_detail_posix_program__location__impl.hpp +++ b/devel/boost-libs/files/patch-boost_dll_detail_posix_program__location__impl.hpp @@ -1,11 +1,30 @@ ---- boost/dll/detail/posix/program_location_impl.hpp.orig 2025-06-14 19:35:17 UTC +From d662bcbb67ae5da919d35f83e0bcc21769de0ac4 Mon Sep 17 00:00:00 2001 +From: Antony Polukhin <antoshkka@gmail.com> +Date: Wed, 11 Jun 2025 09:59:25 +0300 +Subject: [PATCH] Fix usage of missing variable (#98) + +Fixes https://github.com/boostorg/dll/issues/96 +--- boost/dll/detail/posix/program_location_impl.hpp.orig 2025-04-03 11:37:24 UTC +++ boost/dll/detail/posix/program_location_impl.hpp -@@ -70,7 +70,7 @@ namespace boost { namespace dll { namespace detail { +@@ -70,9 +70,10 @@ namespace boost { namespace dll { namespace detail { mib[2] = KERN_PROC_PATHNAME; mib[3] = -1; char path[1024]; - size_t size = sizeof(buf); +- if (sysctl(mib, 4, path, &size, nullptr, 0) == 0) + size_t size = sizeof(path); - if (sysctl(mib, 4, path, &size, nullptr, 0) == 0) ++ if (sysctl(mib, 4, path, &size, nullptr, 0) == 0) { return boost::dll::fs::path(path); ++ } + const auto errno_snapshot = static_cast<std::errc>(errno); + if (errno_snapshot != std::errc::not_enough_memory) { +@@ -83,7 +84,7 @@ namespace boost { namespace dll { namespace detail { + + std::string p; + p.resize(size); +- if (sysctl(mib, 4, p.data(), &size, nullptr, 0) != 0) { ++ if (sysctl(mib, 4, &p[0], &size, nullptr, 0) != 0) { + ec = std::make_error_code( + static_cast<std::errc>(errno) + ); |