tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: boost, dirfd & NetBSD



On Wed, Sep 09, 2020 at 08:15:57AM +0200, Tobias Nygren wrote:
> On Wed, 9 Sep 2020 16:06:49 +1000
> Paul Ripke <stix%stix.id.au@localhost> wrote:
> 
> > Thoughts? A patch to boost is easy enough, but we should probably
> > just implement a function and be done with it.
> 
> We still need a pkgsrc patch to handle older NetBSD versions.
> I will add a patch.

Thanks! fwiw, minimal patch attached, which seems to work.

The question of fixing it in src/ might receive
> more attention on tech-userlevel@.

I've posed the question, we'll see what happens.

> > (sidenote, how am I the first to notice this?)
> 
> Good question. Maybe this is a recent addition to boost?

Doesn't look like it. I can only suppose that nothing much uses
this particular part of boost.

-- 
Paul Ripke
"Great minds discuss ideas, average minds discuss events, small minds
 discuss people."
-- Disputed: Often attributed to Eleanor Roosevelt. 1948.
diff --git a/meta-pkgs/boost/distinfo b/meta-pkgs/boost/distinfo
index 9ba104c67c1..769bc0ed4da 100644
--- a/meta-pkgs/boost/distinfo
+++ b/meta-pkgs/boost/distinfo
@@ -20,6 +20,7 @@ SHA1 (patch-boost_math_special__functions_expm1.hpp) = 724fbd40b3780da8af6ce10bb
 SHA1 (patch-boost_math_special__functions_log1p.hpp) = df6fd088da736a4640663b64841383432f1a1201
 SHA1 (patch-boost_math_tools_config.hpp) = 9d7ef331414526057a6ac1a0ba1af815f017dfc3
 SHA1 (patch-boost_numeric_ublas_storage.hpp) = 282b5a3b5d09216ded14fae166169d64db72590e
+SHA1 (patch-boost_process_detail_posix_handles.hpp) = f4aad246c7deda86e069b6a6f38a5497e238610a
 SHA1 (patch-boost_property__tree_detail_xml__parser__read__rapidxml.hpp) = 3499fcc37e72396d23a9fce0f1c97891adf12a9f
 SHA1 (patch-boost_regex_config.hpp) = 6b752c7c23168c591cd391739c7a4539bef44c12
 SHA1 (patch-boost_stacktrace_detail_collect__unwind.ipp) = a5922dffd929f596b6e7d71b11f32d17e0bbd806
diff --git a/meta-pkgs/boost/patches/patch-boost_process_detail_posix_handles.hpp b/meta-pkgs/boost/patches/patch-boost_process_detail_posix_handles.hpp
new file mode 100644
index 00000000000..4c57a028a56
--- /dev/null
+++ b/meta-pkgs/boost/patches/patch-boost_process_detail_posix_handles.hpp
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Our dirfd() is a macro, remove the explicit namespace qualifier.
+
+--- boost/process/detail/posix/handles.hpp.orig	2020-09-09 06:28:30.068876804 +0000
++++ boost/process/detail/posix/handles.hpp
+@@ -31,7 +31,7 @@ inline std::vector<native_handle_type> g
+     else
+         ec.clear();
+ 
+-    auto my_fd = ::dirfd(dir.get());
++    auto my_fd = dirfd(dir.get());
+ 
+     struct ::dirent * ent_p;
+ 
+@@ -115,7 +115,7 @@ struct limit_handles_ : handler_base_ext
+             return;
+         }
+ 
+-        auto my_fd = ::dirfd(dir);
++        auto my_fd = dirfd(dir);
+         struct ::dirent * ent_p;
+ 
+         while ((ent_p = readdir(dir)) != nullptr)


Home | Main Index | Thread Index | Old Index