title: 'pthread_setname_np' was not declared in this scope
body: <p>I have created multiple threads in my application. I want to assign a name to each pthread so I used <code>pthread_setname_np</code> which worked on Ubuntu but is not working on SUSE Linux.</p>
  
  <p>I googled it and came to know '_np' means 'non portable' and this api is not available on all OS flavors of Linux.</p>
  
  <p>So now I want to do it only if the API is available. How to determine whether the api is available or not ? I need something like this.</p>
  
  <pre><code>#ifdef SOME_MACRO
      pthread_setname_np(tid, "someName");
  #endif
  </code></pre>