Skip to content

Commit

Permalink
Fixes compiler error "error: 'asio::posix' has not been declared" on …
Browse files Browse the repository at this point in the history
…Windows 10 with MSYS Mingw64 10.3.0

Issue: chriskohlhoff#884

Signed-off-by: David Wedderwille <[email protected]>
  • Loading branch information
davidwed committed Aug 11, 2021
1 parent d038fb3 commit e88ed8b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions asio/src/examples/cpp14/parallel_group/wait_for_all.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <asio/experimental/parallel_group.hpp>
#include <iostream>

#ifdef ASIO_HAS_POSIX_STREAM_DESCRIPTOR

int main()
{
asio::io_context ctx;
Expand Down Expand Up @@ -56,3 +58,7 @@ int main()

ctx.run();
}

#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
int main() {}
#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
6 changes: 6 additions & 0 deletions asio/src/examples/cpp14/parallel_group/wait_for_one.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <asio/experimental/parallel_group.hpp>
#include <iostream>

#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)

int main()
{
asio::io_context ctx;
Expand Down Expand Up @@ -56,3 +58,7 @@ int main()

ctx.run();
}

#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
int main() {}
#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
6 changes: 6 additions & 0 deletions asio/src/examples/cpp14/parallel_group/wait_for_one_error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <asio/experimental/parallel_group.hpp>
#include <iostream>

#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)

int main()
{
asio::io_context ctx;
Expand Down Expand Up @@ -56,3 +58,7 @@ int main()

ctx.run();
}

#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
int main() {}
#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include <asio/experimental/parallel_group.hpp>
#include <iostream>

#if defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)

int main()
{
asio::io_context ctx;
Expand Down Expand Up @@ -56,3 +58,7 @@ int main()

ctx.run();
}

#else // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
int main() {}
#endif // defined(ASIO_HAS_POSIX_STREAM_DESCRIPTOR)

0 comments on commit e88ed8b

Please sign in to comment.