summaryrefslogtreecommitdiffstats
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-15 10:07:03 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-15 10:07:03 +0100
commitf041360ac17bc032c7e5a4553372893e42ba68c6 (patch)
tree99c66c42e7a1fa41e139a334bab6fde39b79c735 /src/Utils.cpp
parent477782190324caf69445f59e2a9ce02152c06106 (diff)
downloaddabmod-f041360ac17bc032c7e5a4553372893e42ba68c6.tar.gz
dabmod-f041360ac17bc032c7e5a4553372893e42ba68c6.tar.bz2
dabmod-f041360ac17bc032c7e5a4553372893e42ba68c6.zip
Check for prctl portability
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index cd116c7..f423dc1 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -27,7 +27,9 @@
#include "Utils.h"
#include "GainControl.h"
-#include <sys/prctl.h>
+#if defined(HAVE_PRCTL)
+# include <sys/prctl.h>
+#endif
#include <pthread.h>
static void printHeader()
@@ -160,7 +162,9 @@ int set_realtime_prio(int prio)
void set_thread_name(const char *name)
{
+#if defined(HAVE_PRCTL)
prctl(PR_SET_NAME,name,0,0,0);
+#endif
}
double parseChannel(const std::string& chan)