aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 5b76cfe02a..eb72e2e663 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -114,8 +114,12 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
#define U64_LITERAL(n) (n ## llu)
#endif
-const char *tor_mmap_file(const char *filename, size_t *size);
-void tor_munmap_file(const char *memory, size_t size);
+/** Opaque bookkeeping type used for mmap accounting. */
+typedef struct tor_mmap_t tor_mmap_t;
+
+tor_mmap_t *tor_mmap_file(const char *filename,
+ const char **data, size_t *size);
+void tor_munmap_file(tor_mmap_t *handle);
int tor_snprintf(char *str, size_t size, const char *format, ...)
CHECK_PRINTF(3,4);