mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 01:08:10 +02:00
Fix compilation on Travis (I hope)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user