From: Frantisek Sumsal Date: Mon, 4 Sep 2023 17:32:22 +0000 (+0200) Subject: network: make the build happy on i*86 again X-Git-Tag: v255-rc1~586 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8f281abcef80024045358d1f4420a17acacc69e;p=thirdparty%2Fsystemd.git network: make the build happy on i*86 again In file included from ../src/basic/macro.h:455, from ../src/basic/alloc-util.h:10, from ../src/basic/hash-funcs.h:4, from ../src/basic/hashmap.h:8, from ../src/shared/dns-domain.h:10, from ../src/network/networkd-radv.c:9: ../src/network/networkd-radv.c: In function ‘config_parse_router_home_agent_lifetime’: ../src/network/networkd-radv.c:1626:28: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 11 has type ‘long long unsigned int’ [-Werror=format=] 1626 | "Invalid %s= must be in the range 1...%lu seconds, ignoring: %s", lvalue, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/basic/log.h:361:125: note: in definition of macro ‘log_syntax’ 361 | ? log_syntax_internal(unit, _level, config_file, config_line, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \ | ^~~~~~~~~~~ ../src/network/networkd-radv.c:1626:68: note: format string is defined here 1626 | "Invalid %s= must be in the range 1...%lu seconds, ignoring: %s", lvalue, | ~~^ | | | long unsigned int | %llu cc1: all warnings being treated as errors Addresses: https://github.com/systemd/systemd/pull/28964#issuecomment-1705550404 Follow-up to 6a6d27bc5b0. --- diff --git a/src/network/networkd-radv.c b/src/network/networkd-radv.c index b5ee1c322d4..d6a8d36152b 100644 --- a/src/network/networkd-radv.c +++ b/src/network/networkd-radv.c @@ -1623,8 +1623,8 @@ int config_parse_router_home_agent_lifetime( if (usec == USEC_INFINITY || usec == 0 || DIV_ROUND_UP(usec, USEC_PER_SEC) > RADV_MAX_HOME_AGENT_LIFETIME_USEC) { log_syntax(unit, LOG_WARNING, filename, line, 0, - "Invalid %s= must be in the range 1...%lu seconds, ignoring: %s", lvalue, - RADV_MAX_HOME_AGENT_LIFETIME_USEC / USEC_PER_SEC, rvalue); + "Invalid %s= must be in the range 1…%s, ignoring: %s", lvalue, + FORMAT_TIMESPAN(RADV_MAX_HOME_AGENT_LIFETIME_USEC, USEC_PER_SEC), rvalue); return 0; }