Skip to content

Commit d9d2b83

Browse files
authored
Merge pull request #473 from lo-simon/fix-boost-lock-error-define
Fix C++11 build using boost
2 parents b533944 + d1d851a commit d9d2b83

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Development/nmos/api_utils.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,12 +651,14 @@ namespace nmos
651651
slog::log<slog::severities::warning>(gate, SLOG_FLF) << "HTTP error: " << e.what() << " [" << e.error_code() << "]";
652652
set_error_reply(res, status_codes::BadRequest, e);
653653
}
654+
#ifdef BST_THREAD_BOOST
654655
// Boost lock error indicates cannot get lock, perhaps lock limit exceeded
655656
catch (const boost::lock_error& e)
656657
{
657658
slog::log<slog::severities::error>(gate, SLOG_FLF) << "Boost lock error: " << e.what() << " Perhaps lock limit exceeded";
658659
set_error_reply(res, status_codes::ServiceUnavailable, {}, U("Cannot get lock. Perhaps lock limit exceeded"));
659660
}
661+
#endif
660662
// while a runtime_error (often) indicates an unimplemented feature
661663
catch (const std::runtime_error& e)
662664
{

0 commit comments

Comments
 (0)