From c8c760a06980ff7d6183e5d8e993c55acb899678 Mon Sep 17 00:00:00 2001 From: Johns Date: Sat, 31 Dec 2011 17:28:58 +0100 Subject: Make pthread_setname_np optional for older glibc. --- Makefile | 1 + audio.c | 4 ++++ video.c | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 222100e..7f57613 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ VERSION = $(shell grep 'static const char \*const VERSION *=' $(PLUGIN).cpp | aw ### Configuration (edit this for your needs) CONFIG := #-DDEBUG +#CONFIG += -DHAVE_PTHREAD_NAME CONFIG += $(shell pkg-config --exists libva && echo "-DUSE_VAAPI") CONFIG += $(shell pkg-config --exists vdpau && echo "-DUSE_VDPAU") diff --git a/audio.c b/audio.c index fdbb792..a12372f 100644 --- a/audio.c +++ b/audio.c @@ -48,6 +48,10 @@ #define __USE_GNU #endif #include +#ifndef HAVE_PTHREAD_NAME + /// only available with newer glibc +#define pthread_setname_np(thread, name) +#endif #endif #include "ringbuffer.h" diff --git a/video.c b/video.c index bd9a966..a9d86d3 100644 --- a/video.c +++ b/video.c @@ -68,6 +68,10 @@ #endif #include #include +#ifndef HAVE_PTHREAD_NAME + /// only available with newer glibc +#define pthread_setname_np(thread, name) +#endif #endif #ifdef USE_XLIB_XCB -- cgit v1.2.3