From cfb678d6183e7a9578e95a5d87ab8bff5eef5c72 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 May 2019 16:09:23 +0200 Subject: [PATCH] config/Parser: work around conflicting macro MAX_INPUT linux/limits.h defines MAX_INPUT which breaks the build. --- src/config/Parser.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/Parser.cxx b/src/config/Parser.cxx index 7e472944b..428017a5c 100644 --- a/src/config/Parser.cxx +++ b/src/config/Parser.cxx @@ -41,8 +41,8 @@ template static size_t Multiply(size_t value) { - static constexpr size_t MAX_INPUT = SIZE_MAX / OPERAND; - if (value > MAX_INPUT) + static constexpr size_t MAX_VALUE = SIZE_MAX / OPERAND; + if (value > MAX_VALUE) throw std::runtime_error("Value too large"); return value * OPERAND;