aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 393cc413d6..f55c9c8c34 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1064,8 +1064,8 @@ fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
int ScheduleBatchPriority(void)
{
#ifdef SCHED_BATCH
- const static sched_param param{.sched_priority = 0};
- if (int ret = pthread_setschedparam(0, SCHED_BATCH, &param)) {
+ const static sched_param param{0};
+ if (int ret = pthread_setschedparam(pthread_self(), SCHED_BATCH, &param)) {
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno));
return ret;
}