<div>Nginx define _FILE_OFFSET_BITS=64 in linux platform(ngx_linux_config.h), and it will cause size of off_t is 8 byte. Therefore it should include nginx header file in starting position of other module(must be before <sys/types.h>), otherwise off_t will be 4 byte(32 bit system) in the module, this will be to cause some confusion .</div>
<div><br></div><div>I think use gcc -D will be better.</div><div><span class="Apple-style-span" style="font-family: arial, 宋体; font-size: 16px; line-height: 20px; white-space: pre-wrap; background-color: rgb(255, 255, 255); "><br>
</span></div><div><span class="Apple-style-span" style="font-family: arial, 宋体; font-size: 16px; line-height: 20px; white-space: pre-wrap; background-color: rgb(255, 255, 255); ">this is my patch:</span></div><div><span class="Apple-style-span" style="font-family: arial, 宋体; font-size: 16px; line-height: 20px; white-space: pre-wrap; background-color: rgb(255, 255, 255); "><br>
</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); line-height: 20px; white-space: pre-wrap;"><font class="Apple-style-span" face="arial, 宋体" size="3">Index: auto/os/linux
===================================================================
--- auto/os/linux (revision 4267)
+++ auto/os/linux (working copy)
@@ -15,6 +15,9 @@
CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
+CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
+
+
# Linux kernel version
version=$((`uname -r \
Index: src/os/unix/ngx_linux_config.h
===================================================================
--- src/os/unix/ngx_linux_config.h (revision 4267)
+++ src/os/unix/ngx_linux_config.h (working copy)
@@ -12,7 +12,6 @@
#define _GNU_SOURCE /* pread(), pwrite(), gethostname() */
#endif
-#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
#include <sys/time.h></font></span><span class="Apple-style-span" style="font-family: arial, 宋体; font-size: 16px; line-height: 20px; white-space: pre-wrap; background-color: rgb(255, 255, 255); ">
</span></div><div><span class="Apple-style-span" style="font-family: arial, 宋体; font-size: 16px; line-height: 20px; white-space: pre-wrap; background-color: rgb(255, 255, 255); "><br></span></div><div><span class="Apple-style-span" style="font-family: arial, 宋体; font-size: 16px; line-height: 20px; white-space: pre-wrap; background-color: rgb(255, 255, 255); "><br>
</span></div><div><span class="Apple-style-span" style="font-family: arial, 宋体; font-size: 16px; line-height: 20px; white-space: pre-wrap; background-color: rgb(255, 255, 255); "><br></span></div>-- <br>douban:<a href="http://www.douban.com/people/mustang/" target="_blank">www.douban.com/people/mustang/</a><br>
<br>blog: <a href="http://www.pagefault.info" target="_blank">www.pagefault.info</a><br><br>twitter: <a href="http://www.twitter.com/minibobo" target="_blank">www.twitter.com/minibobo</a><br><br>weibo: <a href="http://www.weibo.com/diaoliang" target="_blank">www.weibo.com/diaoliang</a><br>
<br>