From: Aurelien DARRAGON Date: Fri, 24 Oct 2025 07:09:59 +0000 (+0200) Subject: Revert "MEDIUM: freq-ctr: use explicit-size types for freq-ctr struct" X-Git-Tag: v3.3-dev11~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8277f891d20ccd968c3a845e9dde5eb9e9932329;p=thirdparty%2Fhaproxy.git Revert "MEDIUM: freq-ctr: use explicit-size types for freq-ctr struct" This reverts commit 4693ee0ff7a5fa4a12ff69b1a33adca142e781ac. As discussed in GH #3168, this works but it is not the proper way to fix the issue. See following commits. --- diff --git a/include/haproxy/freq_ctr-t.h b/include/haproxy/freq_ctr-t.h index 4eed37aab..d5f1a8912 100644 --- a/include/haproxy/freq_ctr-t.h +++ b/include/haproxy/freq_ctr-t.h @@ -28,16 +28,11 @@ * period has to be known by the user. The period is measured in ticks and * must be at least 2 ticks long. This form is slightly more CPU intensive for * reads than the per-second form as it involves a divide. - * - * /!\ any change performed here will impact shm-stats-file mapping because the - * struct is embedded in shm_stats_file_object struct, so proceed with caution - * and change shm stats file version if needed. Also, fixed width integer types - * should be used (for portability) */ struct freq_ctr { - FIXED_SIZE(4, unsigned int, curr_tick); /* start date of current period (wrapping ticks) */ - FIXED_SIZE(4, unsigned int, curr_ctr); /* cumulated value for current period */ - FIXED_SIZE(4, unsigned int, prev_ctr); /* value for last period */ + unsigned int curr_tick; /* start date of current period (wrapping ticks) */ + unsigned int curr_ctr; /* cumulated value for current period */ + unsigned int prev_ctr; /* value for last period */ }; #endif /* _HAPROXY_FREQ_CTR_T_H */