mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Fix compilation on Travis (I hope)
This commit is contained in:
parent
f8e6f87984
commit
a571821f73
1 changed files with 4 additions and 6 deletions
|
|
@ -6,17 +6,15 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
#ifdef __APPLE__
|
||||
// I cant figure out how to get pthread.h to include this definition on macOS. MACOSX_DEPLOYMENT_TARGET does not work.
|
||||
extern int pthread_setname_np(const char *name);
|
||||
#else
|
||||
// Need _GNU_SOURCE for pthread_setname_np on linux
|
||||
#define _GNU_SOURCE
|
||||
#include <pthread.h>
|
||||
#undef _GNU_SOURCE
|
||||
// Need _GNU_SOURCE for pthread_setname_np on linux and that causes other issues on systems with old glibc
|
||||
extern int pthread_setname_np(pthread_t, const char *name);
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
static inline void
|
||||
set_thread_name(const char *name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue