diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2012-02-20 19:14:35 +0000 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-02-20 19:14:35 +0000 |
commit | 7ba66f42a0cb15ff3cd6a93d6927f68fb8363a13 (patch) | |
tree | 40312db1a44609ba597666150553ed613ee57633 /src/core/ngx_open_file_cache.c | |
parent | 6bb86e3d5852e0d879c2e1f18dc1627172050606 (diff) | |
download | nginx-7ba66f42a0cb15ff3cd6a93d6927f68fb8363a13.tar.gz nginx-7ba66f42a0cb15ff3cd6a93d6927f68fb8363a13.zip |
Disable symlinks: added explicit cast of AT_FDCWD (ticket #111).
Solaris has AT_FDCWD defined to unsigned value, and comparison of a file
descriptor with it causes warnings in modern versions of gcc. Explicitly
cast AT_FDCWD to ngx_fd_t to resolve these warnings.
Diffstat (limited to 'src/core/ngx_open_file_cache.c')
-rw-r--r-- | src/core/ngx_open_file_cache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/ngx_open_file_cache.c b/src/core/ngx_open_file_cache.c index acfc0954c..f42a16f46 100644 --- a/src/core/ngx_open_file_cache.c +++ b/src/core/ngx_open_file_cache.c @@ -582,7 +582,7 @@ ngx_open_file_wrapper(ngx_str_t *name, ngx_open_file_info_t *of, p = name->data; end = p + name->len; - at_fd = AT_FDCWD; + at_fd = NGX_AT_FDCWD; at_name = *name; if (p[0] == '/') { @@ -632,7 +632,7 @@ ngx_open_file_wrapper(ngx_str_t *name, ngx_open_file_info_t *of, goto failed; } - if (at_fd != AT_FDCWD && ngx_close_file(at_fd) == NGX_FILE_ERROR) { + if (at_fd != NGX_AT_FDCWD && ngx_close_file(at_fd) == NGX_FILE_ERROR) { ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, ngx_close_file_n " \"%V\" failed", &at_name); } @@ -642,7 +642,7 @@ ngx_open_file_wrapper(ngx_str_t *name, ngx_open_file_info_t *of, at_name.len = cp - at_name.data; } - if (p == end && at_fd != AT_FDCWD) { + if (p == end && at_fd != NGX_AT_FDCWD) { /* * If pathname ends with a trailing slash, check if last path @@ -690,7 +690,7 @@ ngx_open_file_wrapper(ngx_str_t *name, ngx_open_file_info_t *of, failed: - if (at_fd != AT_FDCWD && ngx_close_file(at_fd) == NGX_FILE_ERROR) { + if (at_fd != NGX_AT_FDCWD && ngx_close_file(at_fd) == NGX_FILE_ERROR) { ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, ngx_close_file_n " \"%V\" failed", &at_name); } |