-
Notifications
You must be signed in to change notification settings - Fork 44
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
Build on OpenBSD #79
Build on OpenBSD #79
Conversation
c2a187f
to
b42ece1
Compare
All comments are addressed, this builds on OpenBSD, does not effect other non-POSIX platforms and should still build fine on POSIX platforms. Thanks for the feedback. |
Looks like I found where pid_t comes from: https://man7.org/linux/man-pages/man2/gettid.2.html
|
I have amended it once more, but you might as well commit this on your own in an OpenBSD unrelated commit, imho. |
Brief reminder. Anything else that comes to mind or is this good enough to go in? |
I have no more suggestions, so we have to wait until @john-preston will have time to look on that |
Thanks, good to know. |
Please, no unneeded changes (such as adding extra logging) |
@john-preston any feedback on this? I just rebased it onto master after your libvpx changes and everything builds fine on OpenBSD. |
Otherwise building as Linux results in compile errors like symbol redifinition; the code is already OpenBSD aware.
Same as the others.
pthread_self(3) returns a phtread_t (aka. pthread *) value. With @ilya-fedin: Redefine thread IDs as `intptr_t` on POSIX platforms unless platform specific functions/types exist so as to avoid the following warning on OpenBSD/amd64 7.0 using clang 11.1.0: ``` platform_thread_types.cc:57:10: error: cast from pointer to smaller type 'rtc::PlatformThreadId' (aka 'int') loses information return reinterpret_cast<PlatformThreadId>(pthread_self()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ``` At least Solaris defines `pid_t` as `long`, i.e. that warning would not occur. OpenBSD defines `pid_t` as `int`. Linux uses its non-portable gettid(3) returing a `pid_t` value, so stick with that.
Rebased once more after conflicts in |
@klemensn what's your native language? |
Suggested by @ilya-fedin, thanks! Co-authored-by: ilya-fedin <[email protected]>
These are required to build on OpenBSD/amd64 7.0 -CURRENT.
Both
net/tg_owt
andnet/tdesktop
have been ported to OpenBSD and widely tested already.tg_owt
is built as shared library and I'd like to avoid carrying local patches as best as possible.