Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does asio support compile on qnx710 #1460

Closed
Je2ry opened this issue Apr 10, 2024 · 3 comments
Closed

Does asio support compile on qnx710 #1460

Je2ry opened this issue Apr 10, 2024 · 3 comments

Comments

@Je2ry
Copy link

Je2ry commented Apr 10, 2024

Hi,i have questions on compile asio on qnx710.
errors:
/home/asio/asio/include/asio/detail/tss_ptr.hpp:29:3: error: #error Only Windows and POSIX are supported!

error Only Windows and POSIX are supported!

/home/asio/asio/include/asio/detail/signal_blocker.hpp:27:3: error: #error Only Windows and POSIX are supported!

error Only Windows and POSIX are supported!

^~~~~
I add add_definitions(-DASIO_HAS_PTHREADS) in my CMakeLists.txt to solve the first problem. I wonder whether it is right.
Besides, how can i solve the second error. Does asion support compile on qnx710 and to build on qnx710,what should i do?

@Je2ry
Copy link
Author

Je2ry commented Apr 10, 2024

already done

@Je2ry Je2ry closed this as completed Apr 10, 2024
@yuzu-ogura
Copy link

already done

Excuse me, I got the same error when cross compile asio repository. Could you tell how do you solve this question?

@Je2ry
Copy link
Author

Je2ry commented Sep 18, 2024

already done

Excuse me, I got the same error when cross compile asio repository. Could you tell how do you solve this question?

Sorry, I did not notice the message.

  1. add this macro
if (TARGET_CPU STREQUAL "QNX710")
    add_definitions(-DASIO_HAS_PTHREADS)
    set(LIBS c socket)
else()
    # set(LIBS pthread)
endif()
  1. QNX deos not support SA_RESTART, so in socket_types.hpp refine related macro:
# if defined(__QNX__)
#  define ASIO_OS_DEF_SA_RESTART 0
# else
#  define ASIO_OS_DEF_SA_RESTART SA_RESTART
# endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants