diff --git a/src/util.cpp b/src/util.cpp --- a/src/util.cpp +++ b/src/util.cpp @@ -1315,8 +1315,8 @@ int ScheduleBatchPriority() { #ifdef SCHED_BATCH - const static sched_param param{.sched_priority = 0}; - if (int ret = pthread_setschedparam(0, SCHED_BATCH, ¶m)) { + const static sched_param param{0}; + if (int ret = pthread_setschedparam(pthread_self(), SCHED_BATCH, ¶m)) { LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno)); return ret; }