aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-04-09 17:02:19 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-04-09 17:02:19 +0200
commitb86730a4d74471378fbafb2bac9839110f520b76 (patch)
tree9ff80ec448db8ed7f380fb8f8b8b15205a141192
parentcff66e6a29d700188f6ecebeaacc8bcaa1fc1095 (diff)
util: Remove designator initializer from ScheduleBatchPriority
Although no compiler appears to complain about it, these are not valid for c++11. (http://en.cppreference.com/w/cpp/language/aggregate_initialization says they're c++20) The structure is defined as: struct sched_param { int sched_priority; }; So passing 0 for the first field has the same effect.
-rw-r--r--src/util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 3043f6b9a3..f55c9c8c34 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1064,7 +1064,7 @@ fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
int ScheduleBatchPriority(void)
{
#ifdef SCHED_BATCH
- const static sched_param param{.sched_priority = 0};
+ 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;