pkgsrc/devel/SDL2/patches/patch-src_thread_pthread_SDL__systhread.c
snj ac29af3c4c Switch SDL2 to the standard autotools build system. Upstream considers
the CMake build system to be experimental.  This gets us working joystick
support on NetBSD, avoids installing bogus headers, and moves us to a sane
library major (which is highly unlikely to ever change again).  Bump
PKGREVISION to 5 and set BUILDLINK_ABI_DEPENDS accordingly.

Recursive revbump coming up.

While here, tidy up this package's options a bit:
- instead of providing six (!) options for standard modern X libraries,
  simply lump them all into the existing x11 option
- provide a dbus option
2015-02-09 08:27:07 +00:00

18 lines
739 B
C

$NetBSD: patch-src_thread_pthread_SDL__systhread.c,v 1.1 2015/02/09 08:27:07 snj Exp $
Handle NetBSD's pthread_setname_np.
--- src/thread/pthread/SDL_systhread.c.orig 2014-03-15 19:31:44.000000000 -0700
+++ src/thread/pthread/SDL_systhread.c 2015-02-09 00:17:52.000000000 -0800
@@ -129,7 +129,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__)