/* Iterate over the file hash table and clean up each entry */
for (hi = apr_hash_first(sconf->fileht); hi; hi=apr_hash_next(hi)) {
- apr_hash_this(hi, NULL, NULL, &file);
+ apr_hash_this(hi, NULL, NULL, (void **)&file);
#if APR_HAS_MMAP
if (file->is_mmapped) {
apr_mmap_delete(file->mm);
apr_file_close(fd);
new_file->is_mmapped = TRUE;
}
+#if APR_HAS_SENDFILE
else {
/* CacheFile directive. Caching the file handle */
new_file->is_mmapped = FALSE;
new_file->file = fd;
}
+#endif
new_file->filename = fspec;
apr_rfc822_date(new_file->mtimestr, new_file->finfo.mtime);
#else
/* Sendfile not supported by this OS */
ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server,
- "mod_file_cache: unable to cache file: %s. Sendfile is not supported on this OS", fspec);
+ "mod_file_cache: unable to cache file: %s. Sendfile is not supported on this OS", filename);
#endif
return NULL;
}