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
NetBSD build fixes #2366
NetBSD build fixes #2366
Conversation
NetBSD has newlocale/snprintf_l but does not have uselocale or per-thread locales.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these changes are easily mergeable, but there are some lingering questions first.
@@ -94,6 +94,8 @@ static inline int ThreadSetName(const char* name) { | |||
#elif defined(__HAIKU__) | |||
rename_thread(find_thread(NULL), name); | |||
return 0; | |||
#elif defined(__NetBSD__) | |||
return pthread_setname_np(pthread_self(), "%s", (void *)name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this need to be cast to void*? This is C code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh fair enough. Please add a space between the cast and the variable then.
Was there really no HAVE flags section yet?? I need to fix that. |
We've had these fixes in pkgsrc for well over a year now. Please merge them!
newlocale
andsnprintf_l
without usinguselocale
- NetBSD does not have per-thread locales.popcount32
is in libc on NetBSD, don't override its definition.pthread_setname_np
takes a printf format string.