]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/stacktrace/detail/location_from_symbol.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / stacktrace / detail / location_from_symbol.hpp
index 534ac91075b5eaa29a06c740d828cfb0f65600a0..699049dd35449a65143b3e7bba4f8b17c50e0699 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright Antony Polukhin, 2016-2017.
+// Copyright Antony Polukhin, 2016-2019.
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
@@ -28,7 +28,7 @@ public:
     explicit location_from_symbol(const void* addr) BOOST_NOEXCEPT
         : dli_()
     {
-        if (!::dladdr(addr, &dli_)) {
+        if (!::dladdr(const_cast<void*>(addr), &dli_)) { // `dladdr` on Solaris accepts nonconst addresses
             dli_.dli_fname = 0;
         }
     }