aboutsummaryrefslogtreecommitdiffstats
path: root/src/Utils.cpp
diff options
context:
space:
mode:
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 385253b..f113be3 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)