On both kfreebsd-amd64 and kfreebsd-i386, trafficserver 4.1.2-1.1
FTBFS with the same error message.
Build logs are available at:
https://buildd.debian.org/status/fetch.php?pkg=trafficserver&arch=kfreebsd-amd64&ver=4.1.2-1.1&stamp=1396503334
https://buildd.debian.org/status/fetch.php?pkg=trafficserver&arch=kfreebsd-i386&ver=4.1.2-1.1&stamp=1396503411
The build log extract with the error message is below.
from IOBuffer.cc:28:
../../lib/ts/ink_thread.h: In function 'void ink_set_thread_name(const char*)':
../../lib/ts/ink_thread.h:317:26: error: 'pthread_setname_np' was not declared in this scope
pthread_setname_np(name);
^
make[3]: *** [EventSystem.o] Error 1
Could someone try to build trafficserver 4.1.2-1.1 with the patch below
on kfreebsd-amd64 or kfreebsd-i386 for me please?
--- a/lib/ts/ink_thread.h 2013-12-05 22:07:48.000000000 +0000
+++ b/lib/ts/ink_thread.h 2014-04-03 11:42:07.518806953 +0100
@@ -313,7 +313,9 @@ ink_thread_exit(void *status)
static inline void
ink_set_thread_name(const char* name ATS_UNUSED)
{
-#if defined(HAVE_PTHREAD_SETNAME_NP_1)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ prctl(PR_SET_NAME, name, 0, 0, 0);
+#elif defined(HAVE_PTHREAD_SETNAME_NP_1)
pthread_setname_np(name);
#elif defined(HAVE_PTHREAD_SETNAME_NP_2)
pthread_setname_np(pthread_self(), name);
Attachment:
signature.asc
Description: Digital signature