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 6a6d27bc5b.
This commit is contained in:
Frantisek Sumsal
2023-09-05 04:53:25 +09:00
committed by Yu Watanabe
parent b677e5cc5f
commit d8f281abce
+2 -2
View File
@@ -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;
}