thread/Name: include stdio.h if HAVE_PRCTL
Caused a build failure with uClibc because snprintf() was not available.
This commit is contained in:
parent
384b6c8288
commit
276a0d9500
1
NEWS
1
NEWS
|
@ -1,4 +1,5 @@
|
||||||
ver 0.19.9 (not yet released)
|
ver 0.19.9 (not yet released)
|
||||||
|
* fix build failure with uClibc
|
||||||
|
|
||||||
ver 0.19.8 (2015/01/14)
|
ver 0.19.8 (2015/01/14)
|
||||||
* input
|
* input
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#if defined(HAVE_PTHREAD_SETNAME_NP) && !defined(__NetBSD__)
|
#if defined(HAVE_PTHREAD_SETNAME_NP) && !defined(__NetBSD__)
|
||||||
# define HAVE_THREAD_NAME
|
# define HAVE_THREAD_NAME
|
||||||
# include <pthread.h>
|
# include <pthread.h>
|
||||||
# include <stdio.h>
|
|
||||||
#elif defined(HAVE_PRCTL)
|
#elif defined(HAVE_PRCTL)
|
||||||
# include <sys/prctl.h>
|
# include <sys/prctl.h>
|
||||||
# ifdef PR_SET_NAME
|
# ifdef PR_SET_NAME
|
||||||
|
@ -31,6 +30,10 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_THREAD_NAME
|
||||||
|
# include <stdio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
SetThreadName(const char *name)
|
SetThreadName(const char *name)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue