Merge pull request #15915 from opensourcerouting/build-format-suseconds

lib, gcc-plugin: fix 64-bit time_t prints
This commit is contained in:
Donald Sharp 2024-05-06 10:26:46 -04:00 committed by GitHub
commit 11fe070e43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -1556,8 +1556,9 @@ static enum nb_error nb_op_yield(struct nb_op_yield_state *ys)
unsigned long min_us = MAX(1, NB_OP_WALK_INTERVAL_US / 50000); unsigned long min_us = MAX(1, NB_OP_WALK_INTERVAL_US / 50000);
struct timeval tv = { .tv_sec = 0, .tv_usec = min_us }; struct timeval tv = { .tv_sec = 0, .tv_usec = min_us };
DEBUGD(&nb_dbg_events, "NB oper-state: yielding %s for %lus (should_batch %d)", DEBUGD(&nb_dbg_events,
ys->xpath, tv.tv_usec, ys->should_batch); "NB oper-state: yielding %s for %lldus (should_batch %d)",
ys->xpath, (long long)tv.tv_usec, ys->should_batch);
if (ys->should_batch) { if (ys->should_batch) {
/* /*

View File

@ -66,6 +66,8 @@ static GTY(()) tree local_pid_t_node;
static GTY(()) tree local_uid_t_node; static GTY(()) tree local_uid_t_node;
static GTY(()) tree local_gid_t_node; static GTY(()) tree local_gid_t_node;
static GTY(()) tree local_time_t_node; static GTY(()) tree local_time_t_node;
static GTY(()) tree local_suseconds_t_node;
static GTY(()) tree local_suseconds64_t_node;
static GTY(()) tree local_socklen_t_node; static GTY(()) tree local_socklen_t_node;
static GTY(()) tree local_in_addr_t_node; static GTY(()) tree local_in_addr_t_node;
@ -85,6 +87,8 @@ static struct type_special {
{ &local_uid_t_node, NULL, &local_uid_t_node, }, { &local_uid_t_node, NULL, &local_uid_t_node, },
{ &local_gid_t_node, NULL, &local_gid_t_node, }, { &local_gid_t_node, NULL, &local_gid_t_node, },
{ &local_time_t_node, NULL, &local_time_t_node, }, { &local_time_t_node, NULL, &local_time_t_node, },
{ &local_suseconds_t_node, NULL, &local_suseconds_t_node, },
{ &local_suseconds64_t_node, NULL, &local_suseconds64_t_node, },
{ NULL, NULL, NULL, } { NULL, NULL, NULL, }
}; };
@ -4176,6 +4180,8 @@ handle_finish_parse (void *event_data, void *data)
setup_type ("uid_t", &local_uid_t_node); setup_type ("uid_t", &local_uid_t_node);
setup_type ("gid_t", &local_gid_t_node); setup_type ("gid_t", &local_gid_t_node);
setup_type ("time_t", &local_time_t_node); setup_type ("time_t", &local_time_t_node);
setup_type ("__suseconds_t", &local_suseconds_t_node);
setup_type ("__suseconds64_t", &local_suseconds64_t_node);
setup_type ("socklen_t", &local_socklen_t_node); setup_type ("socklen_t", &local_socklen_t_node);
setup_type ("in_addr_t", &local_in_addr_t_node); setup_type ("in_addr_t", &local_in_addr_t_node);