Skip to content

Commit

Permalink
Win32: fixed unique file index calculations.
Browse files Browse the repository at this point in the history
The old code was breaking strict aliasing rules.

Signed-off-by: Piotr Sikora <[email protected]>
  • Loading branch information
PiotrSikora committed Feb 26, 2024
1 parent 2f9e843 commit eff2ea1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/os/win32/ngx_files.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ ngx_int_t ngx_file_info(u_char *filename, ngx_file_info_t *fi);
(((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 */
Expand Down

0 comments on commit eff2ea1

Please sign in to comment.