summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-06-30 13:27:26 +0200
committerPatrick Steinhardt <ps@pks.im>2017-07-03 08:51:47 +0000
commit0fb4b3519c32914073016f566555286c10e80fac (patch)
treea8ba7a6cac1132d4195e362b7cef2c59c0af4b75 /src
parent9b0482e4d455cfa040f1e4c8fc2935d6866d72c7 (diff)
downloadlibgit2-0fb4b3519c32914073016f566555286c10e80fac.tar.gz
Fix missing include for header files
Some of our header files are not included at all by any of their implementing counter-parts. Including them inside of these files leads to some compile errors mostly due to unknown types because of missing includes. But there's also one case where a declared function does not match the implementation's prototype. Fix all these errors by fixing up the prototype and adding missing includes. This is preparatory work for fixing up missing includes in the implementation files.
Diffstat (limited to 'src')
-rw-r--r--src/clone.h2
-rw-r--r--src/diff_generate.h4
-rw-r--r--src/diff_tform.h2
-rw-r--r--src/fetch.h2
-rw-r--r--src/fetchhead.h1
-rw-r--r--src/indexer.h4
-rw-r--r--src/patch_parse.h2
-rw-r--r--src/refdb_fs.h2
-rw-r--r--src/util.h3
9 files changed, 19 insertions, 3 deletions
diff --git a/src/clone.h b/src/clone.h
index 14ca5d44c..fa2049817 100644
--- a/src/clone.h
+++ b/src/clone.h
@@ -7,6 +7,8 @@
#ifndef INCLUDE_clone_h__
#define INCLUDE_clone_h__
+#include "git2/clone.h"
+
extern int git_clone__should_clone_local(const char *url, git_clone_local_t local);
#endif
diff --git a/src/diff_generate.h b/src/diff_generate.h
index 63e7f0532..8b974becf 100644
--- a/src/diff_generate.h
+++ b/src/diff_generate.h
@@ -7,6 +7,10 @@
#ifndef INCLUDE_diff_generate_h__
#define INCLUDE_diff_generate_h__
+#include "diff.h"
+#include "pool.h"
+#include "index.h"
+
enum {
GIT_DIFFCAPS_HAS_SYMLINKS = (1 << 0), /* symlinks on platform? */
GIT_DIFFCAPS_IGNORE_STAT = (1 << 1), /* use stat? */
diff --git a/src/diff_tform.h b/src/diff_tform.h
index 5bd9712d9..dbb4b5455 100644
--- a/src/diff_tform.h
+++ b/src/diff_tform.h
@@ -7,6 +7,8 @@
#ifndef INCLUDE_diff_tform_h__
#define INCLUDE_diff_tform_h__
+#include "diff_file.h"
+
extern int git_diff_find_similar__hashsig_for_file(
void **out, const git_diff_file *f, const char *path, void *p);
diff --git a/src/fetch.h b/src/fetch.h
index 0412d4e44..4cdbf3b95 100644
--- a/src/fetch.h
+++ b/src/fetch.h
@@ -7,6 +7,8 @@
#ifndef INCLUDE_fetch_h__
#define INCLUDE_fetch_h__
+#include "git2/remote.h"
+
#include "netops.h"
int git_fetch_negotiate(git_remote *remote, const git_fetch_options *opts);
diff --git a/src/fetchhead.h b/src/fetchhead.h
index b03bd0f74..69a1e86b5 100644
--- a/src/fetchhead.h
+++ b/src/fetchhead.h
@@ -7,6 +7,7 @@
#ifndef INCLUDE_fetchhead_h__
#define INCLUDE_fetchhead_h__
+#include "oid.h"
#include "vector.h"
typedef struct git_fetchhead_ref {
diff --git a/src/indexer.h b/src/indexer.h
index 702694bbf..cae314064 100644
--- a/src/indexer.h
+++ b/src/indexer.h
@@ -7,6 +7,8 @@
#ifndef INCLUDE_indexer_h__
#define INCLUDE_indexer_h__
-extern int git_indexer__set_fsync(git_indexer *idx, int do_fsync);
+#include "git2/indexer.h"
+
+extern void git_indexer__set_fsync(git_indexer *idx, int do_fsync);
#endif
diff --git a/src/patch_parse.h b/src/patch_parse.h
index 99eb4587b..5c4d04fd5 100644
--- a/src/patch_parse.h
+++ b/src/patch_parse.h
@@ -7,6 +7,8 @@
#ifndef INCLUDE_patch_parse_h__
#define INCLUDE_patch_parse_h__
+#include "patch.h"
+
typedef struct {
git_refcount rc;
diff --git a/src/refdb_fs.h b/src/refdb_fs.h
index 79e296833..a979383cf 100644
--- a/src/refdb_fs.h
+++ b/src/refdb_fs.h
@@ -7,6 +7,8 @@
#ifndef INCLUDE_refdb_fs_h__
#define INCLUDE_refdb_fs_h__
+#include "strmap.h"
+
typedef struct {
git_strmap *packfile;
time_t packfile_time;
diff --git a/src/util.h b/src/util.h
index 1ff50802b..8bba368ba 100644
--- a/src/util.h
+++ b/src/util.h
@@ -9,6 +9,7 @@
#include "git2/buffer.h"
#include "buffer.h"
+#include "thread-utils.h"
#include "common.h"
#include "strnlen.h"
@@ -286,8 +287,6 @@ extern int git__strncasecmp(const char *a, const char *b, size_t sz);
extern int git__strcasesort_cmp(const char *a, const char *b);
-#include "thread-utils.h"
-
typedef struct {
git_atomic refcount;
void *owner;