cmake LWS_HAS_PTHREAD_SETNAME_NP examples

warmcat/libwebsockets CMakeLists.txt :795

CHECK_C_SOURCE_COMPILES("
		#ifndef _GNU_SOURCE
		#define _GNU_SOURCE
		#endif
		#include <pthread.h>
		int main(void) {
		#ifdef __PTW32_H
			pthread_t th = {0,0};
		#else
			pthread_t th = 0;
		#endif
			pthread_setname_np(th, NULL);
			return 0;
		}" LWS_HAS_PTHREAD_SETNAME_NP)

c-jimenez/open-ocpp 3rdparty/libwebsockets/CMakeLists.txt :699

CHECK_C_SOURCE_COMPILES("
		#ifndef _GNU_SOURCE
		#define _GNU_SOURCE
		#endif
		#include <pthread.h>
		int main(void) {
		#ifdef __PTW32_H
			pthread_t th = {0,0};
		#else
			pthread_t th = 0;
		#endif
			pthread_setname_np(th, NULL);
			return 0;
		}" LWS_HAS_PTHREAD_SETNAME_NP)

fluffos/fluffos src/thirdparty/libwebsockets/CMakeLists.txt :682

CHECK_C_SOURCE_COMPILES("
		#ifndef _GNU_SOURCE
		#define _GNU_SOURCE
		#endif
		#include <pthread.h>
		int main(void) {
		#ifdef __PTW32_H
			pthread_t th = {0,0};
		#else
			pthread_t th = 0;
		#endif
			pthread_setname_np(th, NULL);
			return 0;
		}" LWS_HAS_PTHREAD_SETNAME_NP)