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

error: unknown type name 'thrd_t #353

Closed
juha-h opened this issue May 11, 2022 · 14 comments
Closed

error: unknown type name 'thrd_t #353

juha-h opened this issue May 11, 2022 · 14 comments

Comments

@juha-h
Copy link
Contributor

juha-h commented May 11, 2022

I just tried to my Android app using the latest main branches of re/rem/baresip. libbaresip build succeesed without errors, but build of the app failed like this:

In file included from /usr/src/baresip-studio/app/src/main/cpp/vidisp.c:5:
In file included from /usr/src/baresip-studio/distribution.video/re/include/re.h:59:
/usr/src/baresip-studio/distribution.video/re/include/re_thread.h:69:17: error: unknown type name 'thrd_t'

Line 5 of vidisp.c has:

#include <re.h>

Am I missing some new include or something?

@sreimers
Copy link
Member

Interesting It should fallback to pthread. Can you try:

--- a/include/re_thread.h
+++ b/include/re_thread.h
-#if defined(HAVE_THREADS)
+#if defined(HAVE_THREADS) && !defined(__STDC_NO_THREADS__)

@sreimers
Copy link
Member

sreimers commented May 11, 2022

Is HAVE_PTHREAD maybe not defined by your app?

@juha-h
Copy link
Contributor Author

juha-h commented May 11, 2022 via email

@juha-h
Copy link
Contributor Author

juha-h commented May 11, 2022 via email

@juha-h
Copy link
Contributor Author

juha-h commented May 11, 2022 via email

@sreimers
Copy link
Member

I think you need to add the HAVE_PTHREAD definition here:

https://github.com/juha-h/baresip-studio/blob/video/app/src/main/cpp/CMakeLists.txt

Like we did:

add_definitions(-DHAVE_PTHREAD)

@juha-h
Copy link
Contributor Author

juha-h commented May 11, 2022 via email

@sreimers
Copy link
Member

sreimers commented May 11, 2022

because this file only handles linking.

You are compiling: baresip.c vidisp.c with libre headers here:

https://github.com/juha-h/baresip-studio/blob/f0cc3813e5458a8b324923db94a2231a7f2447e3/app/src/main/cpp/CMakeLists.txt#L125

@juha-h
Copy link
Contributor Author

juha-h commented May 11, 2022 via email

@juha-h
Copy link
Contributor Author

juha-h commented Oct 11, 2022 via email

@juha-h
Copy link
Contributor Author

juha-h commented Oct 11, 2022

I don't know where these comments come from. I haven't made them. Perhaps my GitHub account has been hacked.

@sreimers
Copy link
Member

Looks like a late E-Mail reply comment.

@juha-h
Copy link
Contributor Author

juha-h commented Oct 11, 2022 via email

@juha-h
Copy link
Contributor Author

juha-h commented Oct 11, 2022 via email

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