Unfortunately, sd-bus-vtable.h, sd-journal.h, and sd-id128.h
have variadic macro and inline initialization of sub-object, these are
not supported in C90. So, we need to silence some errors.
return r;
if (strcmp(property, "LogLevel") == 0) {
- for (int i = 0; i < LOG_DEBUG + 1; i++)
+ int i;
+ for (i = 0; i < LOG_DEBUG + 1; i++)
if (strcmp(value, log_level_table[i]) == 0) {
o->log_level = i;
setlogmask(LOG_UPTO(i));
}
if (strcmp(property, "LogTarget") == 0) {
- for (LogTarget i = 0; i < _LOG_TARGET_MAX; i++)
+ LogTarget i;
+ for (i = 0; i < _LOG_TARGET_MAX; i++)
if (strcmp(value, log_target_table[i]) == 0) {
o->log_target = i;
return 0;
]
std_args_in = [
+ [ '-std=c90', '-Wno-pedantic', '-Wno-variadic-macros', ],
[ '-std=c99', ],
[ '-std=c11', ],
[ '-std=c17', ],
[ '-std=c23', ],
+ [ '-std=gnu90', '-Wno-pedantic', '-Wno-variadic-macros', ],
[ '-std=gnu99', ],
[ '-std=gnu11', ],
[ '-std=gnu17', ],
#include <systemd/sd-bus.h>
int append_strings_to_message(sd_bus_message *m, const char *const *arr) {
+ const char *s;
int r;
r = sd_bus_message_open_container(m, 'a', "s");
if (r < 0)
return r;
- for (const char *s = *arr; *s; s++) {
+ for (s = *arr; *s; s++) {
r = sd_bus_message_append(m, "s", s);
if (r < 0)
return r;