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

NetBSD build fixes #2366

Merged
merged 6 commits into from Nov 29, 2021
Merged

NetBSD build fixes #2366

merged 6 commits into from Nov 29, 2021

Conversation

alarixnia
Copy link
Contributor

We've had these fixes in pkgsrc for well over a year now. Please merge them!

  • Use newlocale and snprintf_l without using uselocale - 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.

Copy link
Member

@endrift endrift left a 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);
Copy link
Member

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.

Copy link
Contributor Author

@alarixnia alarixnia Nov 28, 2021

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]"

Copy link
Member

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.

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
@endrift endrift merged commit eeeefa4 into mgba-emu:master Nov 29, 2021
@endrift
Copy link
Member

endrift commented Nov 29, 2021

Was there really no HAVE flags section yet?? I need to fix that.

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

Successfully merging this pull request may close these issues.

None yet

2 participants