diff options
author | Igor Sysoev <igor@sysoev.ru> | 2011-09-29 15:19:36 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2011-09-29 15:19:36 +0000 |
commit | a40e7eed307d3344b45be3ca9f9f6143f1df3a96 (patch) | |
tree | 9fcca4159294306f5fda6b59d5613dc9613f20ac /src | |
parent | 5cc90f309dad4d02a83e929b3a46e6ad895d75dc (diff) | |
download | nginx-a40e7eed307d3344b45be3ca9f9f6143f1df3a96.tar.gz nginx-a40e7eed307d3344b45be3ca9f9f6143f1df3a96.zip |
Fix of building on platforms with 32-bit off_t. (closed #23)
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_mp4_module.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c index 9a3362e8d..1bc13a62e 100644 --- a/src/http/modules/ngx_http_mp4_module.c +++ b/src/http/modules/ngx_http_mp4_module.c @@ -187,14 +187,14 @@ typedef struct { + ( ((u_char *) (p))[7]) ) #define ngx_mp4_set_64value(p, n) \ - ((u_char *) (p))[0] = (u_char) ((n) >> 56); \ - ((u_char *) (p))[1] = (u_char) ((n) >> 48); \ - ((u_char *) (p))[2] = (u_char) ((n) >> 40); \ - ((u_char *) (p))[3] = (u_char) ((n) >> 32); \ - ((u_char *) (p))[4] = (u_char) ((n) >> 24); \ - ((u_char *) (p))[5] = (u_char) ((n) >> 16); \ - ((u_char *) (p))[6] = (u_char) ((n) >> 8); \ - ((u_char *) (p))[7] = (u_char) (n) + ((u_char *) (p))[0] = (u_char) ((uint64_t) (n) >> 56); \ + ((u_char *) (p))[1] = (u_char) ((uint64_t) (n) >> 48); \ + ((u_char *) (p))[2] = (u_char) ((uint64_t) (n) >> 40); \ + ((u_char *) (p))[3] = (u_char) ((uint64_t) (n) >> 32); \ + ((u_char *) (p))[4] = (u_char) ( (n) >> 24); \ + ((u_char *) (p))[5] = (u_char) ( (n) >> 16); \ + ((u_char *) (p))[6] = (u_char) ( (n) >> 8); \ + ((u_char *) (p))[7] = (u_char) (n) #define ngx_mp4_last_trak(mp4) \ &((ngx_http_mp4_trak_t *) mp4->trak.elts)[mp4->trak.nelts - 1] @@ -1066,7 +1066,7 @@ ngx_http_mp4_update_mdat_atom(ngx_http_mp4_file_t *mp4, off_t start_offset) atom_header = mp4->mdat_atom_header; - if (atom_data_size > 0xffffffff) { + if ((uint64_t) atom_data_size > 0xffffffff) { atom_size = 1; atom_header_size = sizeof(ngx_mp4_atom_header64_t); ngx_mp4_set_64value(atom_header + sizeof(ngx_mp4_atom_header_t), |