]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] added 'std::' to strerror. sunstudio is strict and requires this.
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 3 Oct 2012 07:58:32 +0000 (07:58 +0000)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 3 Oct 2012 07:58:32 +0000 (07:58 +0000)
this fixes build regression: http://git.bind10.isc.org/~tester/builder//BIND10/20121003052334-Solaris10-sparc-Sunstudio/logs/build.out
committing at my discretion (confirmed it compiled)

src/lib/util/threads/lock.cc
src/lib/util/threads/thread.cc

index de7bf072fb3ec8c6ef2a9eccada1bad38a0a4bb9..6a165aa5314ad854954cdf5badf028ba9833bb7e 100644 (file)
@@ -67,14 +67,14 @@ Mutex::Mutex() :
         case ENOMEM:
             throw std::bad_alloc();
         default:
-            isc_throw(isc::InvalidOperation, strerror(result));
+            isc_throw(isc::InvalidOperation, std::strerror(result));
     }
     Deinitializer deinitializer(attributes);
     // TODO: Distinguish if debug mode is enabled in compilation.
     // If so, it should be PTHREAD_MUTEX_NORMAL or NULL
     result = pthread_mutexattr_settype(&attributes, PTHREAD_MUTEX_ERRORCHECK);
     if (result != 0) {
-        isc_throw(isc::InvalidOperation, strerror(result));
+        isc_throw(isc::InvalidOperation, std::strerror(result));
     }
     auto_ptr<Impl> impl(new Impl);
     result = pthread_mutex_init(&impl->mutex, &attributes);
@@ -86,7 +86,7 @@ Mutex::Mutex() :
         case EAGAIN:
             throw std::bad_alloc();
         default:
-            isc_throw(isc::InvalidOperation, strerror(result));
+            isc_throw(isc::InvalidOperation, std::strerror(result));
     }
 }
 
@@ -114,7 +114,7 @@ Mutex::lock() {
     assert(impl_ != NULL);
     const int result = pthread_mutex_lock(&impl_->mutex);
     if (result != 0) {
-        isc_throw(isc::InvalidOperation, strerror(result));
+        isc_throw(isc::InvalidOperation, std::strerror(result));
     }
     ++impl_->locked_count; // Only in debug mode
 }
index 3382fe2b1eeb35cdca760193a6a6128a9ba74370..c1c9cdf028615e8e2b9cff1bedad81dca1486502 100644 (file)
@@ -115,7 +115,7 @@ Thread::Thread(const boost::function<void ()>& main) :
         case EAGAIN:
             throw std::bad_alloc();
         default: // Other errors. They should not happen.
-            isc_throw(isc::InvalidOperation, strerror(result));
+            isc_throw(isc::InvalidOperation, std::strerror(result));
     }
 }
 
@@ -139,7 +139,7 @@ Thread::wait() {
 
     const int result = pthread_join(impl_->tid_, NULL);
     if (result != 0) {
-        isc_throw(isc::InvalidOperation, strerror(result));
+        isc_throw(isc::InvalidOperation, std::strerror(result));
     }
 
     // Was there an exception in the thread?