adopt NGX_FILE_TRUNCATE for win32
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h
index 982ab12..c4d2b7f 100644
--- a/src/os/unix/ngx_files.h
+++ b/src/os/unix/ngx_files.h
@@ -63,7 +63,7 @@
 #define NGX_FILE_RDWR            O_RDWR
 #define NGX_FILE_CREATE_OR_OPEN  O_CREAT
 #define NGX_FILE_OPEN            0
-#define NGX_FILE_TRUNCATE        O_TRUNC
+#define NGX_FILE_TRUNCATE        O_CREAT|O_TRUNC
 #define NGX_FILE_APPEND          O_WRONLY|O_APPEND
 
 #define NGX_FILE_DEFAULT_ACCESS  0644
diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h
index 5efd0fe..2efbc20 100644
--- a/src/os/win32/ngx_files.h
+++ b/src/os/win32/ngx_files.h
@@ -67,6 +67,7 @@
 
 #define NGX_FILE_CREATE_OR_OPEN     OPEN_ALWAYS
 #define NGX_FILE_OPEN               OPEN_EXISTING
+#define NGX_FILE_TRUNCATE           CREATE_ALWAYS
 
 #define NGX_FILE_DEFAULT_ACCESS     0
 #define NGX_FILE_OWNER_ACCESS       0