summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-06-30 19:24:15 +0200
committerPatrick Steinhardt <ps@pks.im>2017-07-03 08:51:47 +0000
commit9b0482e4d455cfa040f1e4c8fc2935d6866d72c7 (patch)
tree0347523e17bdf5e6c66ce2a24a66d8fd59b230af /deps
parent459fb8fe4f86c872ea394ce000f981148567cefe (diff)
downloadlibgit2-9b0482e4d455cfa040f1e4c8fc2935d6866d72c7.tar.gz
zlib: include "git2/types.h" instead of "common.h"
The zlib dependency includes "common.h" inside of the "zconf.h" header to make available some type declarations like e.g. git_off_t. Including the "common.h" header does pull in quite a lot of other headers though, which are not required at all. Instead, we can just include our public "git2/types.h" header, which is much more limited in its scope but still provides everything required for "zconf.h". This fix eases the transition later on to use a separate "features.h" header instead of defines. As we have to generate the "features.h" header, we put it in the build directory and add an include directory. As we are splitting out building of dependencies into subdirectories, this would mean that the zlib dependency needs to be aware of the parent project's build directory, which is unfortunate. By including "git2/types.h", we avoid this problem.
Diffstat (limited to 'deps')
-rw-r--r--deps/zlib/zconf.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/deps/zlib/zconf.h b/deps/zlib/zconf.h
index 229c40024..3cd7ab158 100644
--- a/deps/zlib/zconf.h
+++ b/deps/zlib/zconf.h
@@ -8,7 +8,8 @@
#ifndef ZCONF_H
#define ZCONF_H
-#include "../../src/common.h"
+#include "../../include/git2/types.h"
+#include <stdarg.h>
/* Jeez, don't complain about non-prototype
* forms, we didn't write zlib */