details: https://hg.nginx.org/nginx/rev/000e2ded0a51 branches: changeset: 9229:000e2ded0a51 user: Piotr Sikora <pi...@aviatrix.com> date: Mon Feb 26 20:00:35 2024 +0000 description: Win32: fixed unique file index calculations.
The old code was breaking strict aliasing rules. Signed-off-by: Piotr Sikora <pi...@aviatrix.com> diffstat: src/os/win32/ngx_files.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (13 lines): diff -r dd4a570ff4ac -r 000e2ded0a51 src/os/win32/ngx_files.h --- a/src/os/win32/ngx_files.h Mon Feb 26 20:00:28 2024 +0000 +++ b/src/os/win32/ngx_files.h Mon Feb 26 20:00:35 2024 +0000 @@ -154,7 +154,8 @@ ngx_int_t ngx_file_info(u_char *filename (((off_t) (fi)->nFileSizeHigh << 32) | (fi)->nFileSizeLow) #define ngx_file_fs_size(fi) ngx_file_size(fi) -#define ngx_file_uniq(fi) (*(ngx_file_uniq_t *) &(fi)->nFileIndexHigh) +#define ngx_file_uniq(fi) \ + (((ngx_file_uniq_t) (fi)->nFileIndexHigh << 32) | (fi)->nFileIndexLow) /* 116444736000000000 is commented in src/os/win32/ngx_time.c */ _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel