diff options
-rw-r--r-- | buckets/apr_buckets_file.c | 6 | ||||
-rw-r--r-- | include/apr_buckets.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/buckets/apr_buckets_file.c b/buckets/apr_buckets_file.c index 302359d8..8eb71842 100644 --- a/buckets/apr_buckets_file.c +++ b/buckets/apr_buckets_file.c @@ -223,15 +223,17 @@ APU_DECLARE(apr_bucket *) apr_bucket_file_create(apr_file_t *fd, return apr_bucket_file_make(b, fd, offset, len, p); } -#if APR_HAS_MMAP APU_DECLARE(apr_status_t) apr_bucket_file_enable_mmap(apr_bucket *e, int enabled) { +#if APR_HAS_MMAP apr_bucket_file *a = e->data; a->can_mmap = enabled; return APR_SUCCESS; -} +#else + return APR_ENOTIMPL; #endif /* APR_HAS_MMAP */ +} static apr_status_t file_bucket_setaside(apr_bucket *data, apr_pool_t *reqpool) diff --git a/include/apr_buckets.h b/include/apr_buckets.h index c9ff3d06..300063ea 100644 --- a/include/apr_buckets.h +++ b/include/apr_buckets.h @@ -1438,7 +1438,6 @@ APU_DECLARE(apr_bucket *) apr_bucket_file_make(apr_bucket *b, apr_file_t *fd, apr_off_t offset, apr_size_t len, apr_pool_t *p); -#if APR_HAS_MMAP /** * Enable or disable memory-mapping for a FILE bucket (default is enabled) * @param b The bucket @@ -1447,7 +1446,6 @@ APU_DECLARE(apr_bucket *) apr_bucket_file_make(apr_bucket *b, apr_file_t *fd, */ APU_DECLARE(apr_status_t) apr_bucket_file_enable_mmap(apr_bucket *b, int enabled); -#endif /* APR_HAS_MMAP */ /** @} */ #ifdef __cplusplus |