Commit 5e97bdaf3c4bafbae629bdff9b2067d7cda41808

Adrián Medraño Calvo 2018-01-22T11:55:28

odb: export mempack backend Fixes #4492, #4496.

diff --git a/include/git2/sys/mempack.h b/include/git2/sys/mempack.h
index 96074fb..490636b 100644
--- a/include/git2/sys/mempack.h
+++ b/include/git2/sys/mempack.h
@@ -11,6 +11,7 @@
 #include "git2/types.h"
 #include "git2/oid.h"
 #include "git2/odb.h"
+#include "git2/buffer.h"
 
 /**
  * @file git2/sys/mempack.h
@@ -38,10 +39,10 @@ GIT_BEGIN_DECL
  *	Subsequent reads will also be served from the in-memory store
  *	to ensure consistency, until the memory store is dumped.
  *
- *	@param out Poiter where to store the ODB backend
+ *	@param out Pointer where to store the ODB backend
  *	@return 0 on success; error code otherwise
  */
-int git_mempack_new(git_odb_backend **out);
+GIT_EXTERN(int) git_mempack_new(git_odb_backend **out);
 
 /**
  *	Dump all the queued in-memory writes to a packfile.
@@ -64,7 +65,7 @@ int git_mempack_new(git_odb_backend **out);
  *	@param backend The mempack backend
  *	@return 0 on success; error code otherwise
  */
-int git_mempack_dump(git_buf *pack, git_repository *repo, git_odb_backend *backend);
+GIT_EXTERN(int) git_mempack_dump(git_buf *pack, git_repository *repo, git_odb_backend *backend);
 
 /**
  *	Reset the memory packer by clearing all the queued objects.
@@ -78,7 +79,7 @@ int git_mempack_dump(git_buf *pack, git_repository *repo, git_odb_backend *backe
  *
  *	@param backend The mempack backend
  */
-void git_mempack_reset(git_odb_backend *backend);
+GIT_EXTERN(void) git_mempack_reset(git_odb_backend *backend);
 
 GIT_END_DECL
 
diff --git a/src/odb_mempack.c b/src/odb_mempack.c
index d6f2fb4..98cc546 100644
--- a/src/odb_mempack.c
+++ b/src/odb_mempack.c
@@ -8,6 +8,7 @@
 #include "common.h"
 #include "git2/object.h"
 #include "git2/sys/odb_backend.h"
+#include "git2/sys/mempack.h"
 #include "fileops.h"
 #include "hash.h"
 #include "odb.h"