]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: make the build happy on i*86 again
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 4 Sep 2023 17:32:22 +0000 (19:32 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 4 Sep 2023 19:53:25 +0000 (04:53 +0900)
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.

src/network/networkd-radv.c

index b5ee1c322d4629aeaaf7e588af33eccbb8c69f85..d6a8d36152b23b83342a28dfb9c3718deb0736af 100644 (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;
         }