mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-14 03:20:22 +00:00
[common] properly define _GNU_SOURCE and set the thread names
This commit is contained in:
@@ -17,7 +17,6 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include "common/crash.h"
|
||||
#include "common/debug.h"
|
||||
|
||||
|
@@ -54,6 +54,8 @@ bool lgCreateThread(const char * name, LGThreadFunction function, void * opaque,
|
||||
*handle = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
pthread_setname_np((*handle)->handle, name);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -71,4 +73,4 @@ bool lgJoinThread(LGThread * handle, int * resultCode)
|
||||
|
||||
free(handle);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user