]> git.kaiwu.me - nginx.git/commitdiff
fix building on platforms with non-supported atomic operations
authorIgor Sysoev <igor@sysoev.ru>
Sun, 11 Feb 2007 07:49:12 +0000 (07:49 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 11 Feb 2007 07:49:12 +0000 (07:49 +0000)
src/core/ngx_cycle.c
src/core/ngx_shmtx.c

index 7daebaac376aa36082eb5a901259a4f7ac7a618b..243febd0e130fe4f5c2db4b79b6f4b8c0fa0136d 100644 (file)
@@ -901,7 +901,8 @@ ngx_test_lockfile(u_char *file, ngx_log_t *log)
 #if !(NGX_HAVE_ATOMIC_OPS)
     ngx_fd_t  fd;
 
-    fd = ngx_open_file(file, NGX_FILE_RDWR, NGX_FILE_CREATE_OR_OPEN);
+    fd = ngx_open_file(file, NGX_FILE_RDWR, NGX_FILE_CREATE_OR_OPEN,
+                       NGX_FILE_DEFAULT_ACCESS);
 
     if (fd == NGX_INVALID_FILE) {
         ngx_log_error(NGX_LOG_EMERG, log, ngx_errno,
index 0d3b096160a5f07e8164f6d34e9a0c77a0872abb..ead94e48423f95da186cf21455430d61963aa25f 100644 (file)
@@ -35,7 +35,8 @@ ngx_shmtx_create(ngx_shmtx_t *mtx, void *addr, u_char *name)
         ngx_shmtx_destory(mtx);
     }
 
-    mtx->fd = ngx_open_file(name, NGX_FILE_RDWR, NGX_FILE_CREATE_OR_OPEN);
+    mtx->fd = ngx_open_file(name, NGX_FILE_RDWR, NGX_FILE_CREATE_OR_OPEN,
+                            NGX_FILE_DEFAULT_ACCESS);
 
     if (mtx->fd == NGX_INVALID_FILE) {
         ngx_log_error(NGX_LOG_EMERG, ngx_cycle->log, ngx_errno,