Actually enable mmap. That should improve matters.

svn:r6694
This commit is contained in:
Nick Mathewson 2006-06-28 08:54:32 +00:00
parent d3784ff1df
commit 1cd04abf1a

View File

@ -107,7 +107,7 @@ const char compat_c_id[] =
#define INADDR_NONE ((unsigned long) -1) #define INADDR_NONE ((unsigned long) -1)
#endif #endif
#ifdef HAVE_SYS_MMAP #ifdef HAVE_SYS_MMAN
const char * const char *
tor_mmap_file(const char *filename, size_t *size) tor_mmap_file(const char *filename, size_t *size)
{ {
@ -152,7 +152,8 @@ const char *
tor_mmap_file(const char *filename, size_t *size) tor_mmap_file(const char *filename, size_t *size)
{ {
char *res = read_file_to_str(filename, 1); char *res = read_file_to_str(filename, 1);
*size = strlen(res) + 1; if (res)
*size = strlen(res) + 1;
return res; return res;
} }