diff --git a/pygit2/decl/diff.h b/pygit2/decl/diff.h
index ded873f68..31a32d520 100644
--- a/pygit2/decl/diff.h
+++ b/pygit2/decl/diff.h
@@ -54,6 +54,7 @@ typedef struct {
 	void                *payload;
 	uint32_t    context_lines;
 	uint32_t    interhunk_lines;
+	git_oid_t   oid_type;
 	uint16_t    id_abbrev;
 	git_off_t   max_size;
 	const char *old_prefix;
diff --git a/pygit2/decl/oid.h b/pygit2/decl/oid.h
index db420f7c5..0890dfdde 100644
--- a/pygit2/decl/oid.h
+++ b/pygit2/decl/oid.h
@@ -1,3 +1,7 @@
+typedef enum {
+	GIT_OID_SHA1 = 1,  /**< SHA1 */
+} git_oid_t;
+
 typedef struct git_oid {
 	unsigned char id[20];
 } git_oid;
diff --git a/pygit2/decl/remote.h b/pygit2/decl/remote.h
index d889356cb..5fedf6d37 100644
--- a/pygit2/decl/remote.h
+++ b/pygit2/decl/remote.h
@@ -83,6 +83,7 @@ typedef struct {
 	int update_fetchhead;
 	git_remote_autotag_option_t download_tags;
 	git_proxy_options proxy_opts;
+	int depth;
 	git_remote_redirect_t follow_redirects;
 	git_strarray custom_headers;
 } git_fetch_options;
diff --git a/src/types.h b/src/types.h
index 0c4aad69f..2c87621a4 100644
--- a/src/types.h
+++ b/src/types.h
@@ -32,8 +32,8 @@
 #include <Python.h>
 #include <git2.h>
 
-#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 6)
-#error You need a compatible libgit2 version (1.6.x)
+#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 7)
+#error You need a compatible libgit2 version (1.7.x)
 #endif
 
 /*