<div dir="ltr"><div>Hi,</div><div><br></div><div>This is prototyped in pthread.h in the current tools:</div><div><br></div><div><div> #if __GNU_VISIBLE</div><div>int     pthread_getname_np(pthread_t, char *, size_t) __nonnull(2);</div><div><br></div><div>int     pthread_setname_np(pthread_t, const char *) __nonnull(2);</div><div>#endif</div></div><div><br></div><div>Do you have current tools? Did you define _GNU_SOURCE so this</div><div>prototype is visible?</div><div><br></div><div>--joel</div><div><br></div><div><br></div>Are you sure your to</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 19, 2017 at 10:00 AM, tokencolour <span dir="ltr"><<a href="mailto:tokencolour@gmail.com" target="_blank">tokencolour@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Gets rid of 1 warning --><br>
warning: no previous prototype for 'pthread_getname_np' [-Wmissing-prototypes]<br>
---<br>
 cpukit/posix/include/rtems/<wbr>posix/pthreadimpl.h | 5 +++++<br>
 cpukit/posix/src/<wbr>pthreadgetnamenp.c            | 1 +<br>
 2 files changed, 6 insertions(+)<br>
<br>
diff --git a/cpukit/posix/include/rtems/<wbr>posix/pthreadimpl.h b/cpukit/posix/include/rtems/<wbr>posix/pthreadimpl.h<br>
index 90a60b6..51a1a2a 100644<br>
--- a/cpukit/posix/include/rtems/<wbr>posix/pthreadimpl.h<br>
+++ b/cpukit/posix/include/rtems/<wbr>posix/pthreadimpl.h<br>
@@ -111,6 +111,11 @@ int rtems_pthread_attribute_<wbr>compare(<br>
   const pthread_attr_t *attr2<br>
 );<br>
<br>
+/*<br>
+ * pthread_getname_np<br>
+ */<br>
+int pthread_getname_np( pthread_t thread, char *name, size_t len );<br>
+<br>
 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate(void)<br>
 {<br>
   _Objects_Allocator_lock();<br>
diff --git a/cpukit/posix/src/<wbr>pthreadgetnamenp.c b/cpukit/posix/src/<wbr>pthreadgetnamenp.c<br>
index e753823..b1a99f0 100644<br>
--- a/cpukit/posix/src/<wbr>pthreadgetnamenp.c<br>
+++ b/cpukit/posix/src/<wbr>pthreadgetnamenp.c<br>
@@ -16,6 +16,7 @@<br>
 #include <string.h><br>
<br>
 #include <rtems/score/threadimpl.h><br>
+#include <rtems/posix/pthreadimpl.h><br>
<br>
 int pthread_getname_np( pthread_t thread, char *name, size_t len )<br>
 {<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.4<br>
<br>
______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/devel</a><br>
</font></span></blockquote></div><br></div>