I have created multiple threads in my application. I want to assign a name to each pthread so I used `pthread_setname_np` which worked on Ubuntu but is not working on SUSE Linux.

I googled it and came to know '\_np' means 'non portable' and this api is not available on all OS flavors of Linux.

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.

```
#ifdef SOME_MACRO
    pthread_setname_np(tid, "someName");
#endif

```