Skip to content

Commit

Permalink
NetBSD: fixed issues with cpuinfo and pthread_setname_np (thanks, Tho…
Browse files Browse the repository at this point in the history
…mas!).

Fixes Bugzilla #3176.
  • Loading branch information
icculus committed Dec 29, 2015
1 parent ce0f90f commit 696cd79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpuinfo/SDL_cpuinfo.c
Expand Up @@ -735,7 +735,7 @@ SDL_GetSystemRAM(void)
#endif
#ifdef HAVE_SYSCTLBYNAME
if (SDL_SystemRAM <= 0) {
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
#ifdef HW_REALMEM
int mib[2] = {CTL_HW, HW_REALMEM};
#else
Expand Down
4 changes: 4 additions & 0 deletions src/thread/pthread/SDL_systhread.c
Expand Up @@ -143,7 +143,11 @@ SDL_SYS_SetupThread(const char *name)
#endif
}
#elif HAVE_PTHREAD_SETNAME_NP
#if defined(__NETBSD__)
pthread_setname_np(pthread_self(), "%s", name);
#else
pthread_setname_np(pthread_self(), name);
#endif
#elif HAVE_PTHREAD_SET_NAME_NP
pthread_set_name_np(pthread_self(), name);
#elif defined(__HAIKU__)
Expand Down

0 comments on commit 696cd79

Please sign in to comment.