Skip to content

Commit

Permalink
fix(asio): Fails to resove dependency?
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cermak committed Dec 18, 2024
1 parent cba5047 commit ace564b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/asio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ target_compile_definitions(${COMPONENT_LIB} PUBLIC SA_RESTART=0x01
ASIO_STANDALONE
ASIO_HAS_PTHREADS
OPENSSL_NO_ENGINE
ASIO_DETAIL_IMPL_POSIX_EVENT_IPP # to inject our own posix_event
)

if(NOT CONFIG_COMPILER_CXX_EXCEPTIONS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ dependencies:
override_path: "../../../"
protocol_examples_common:
path: ${IDF_PATH}/examples/common_components/protocol_examples_common
espressif/sock_utils: "*"
# espressif/sock_utils: "*"
1 change: 1 addition & 0 deletions components/asio/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ repository: https://github.com/espressif/esp-protocols.git
dependencies:
idf:
version: ">=5.0"
espressif/sock_utils: "*"
19 changes: 19 additions & 0 deletions components/asio/port/src/asio_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,28 @@
//
// SPDX-License-Identifier: Apache-2.0
//
#include "asio/detail/posix_event.hpp"
#include "asio/detail/throw_error.hpp"
#include "asio/error.hpp"
#include "asio/detail/push_options.hpp"
#include <unistd.h>
#include <climits>

namespace asio {
namespace detail {

posix_event::posix_event()
: state_(0)
{
int error = ::pthread_cond_init(&cond_, 0);
asio::error_code ec(error,
asio::error::get_system_category());
asio::detail::throw_error(ec, "event");
}

} // namespace detail
} // namespace asio

extern "C" int pause (void)
{
while (true) {
Expand Down

0 comments on commit ace564b

Please sign in to comment.