Skip to content

Commit 93c1625

Browse files
pks-tswisspol
authored andcommitted
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.
1 parent 9449518 commit 93c1625

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

deps/zlib/zconf.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#ifndef ZCONF_H
99
#define ZCONF_H
1010

11-
#include "../../src/common.h"
11+
#include "../../include/git2/types.h"
12+
#include <stdarg.h>
1213

1314
/* Jeez, don't complain about non-prototype
1415
* forms, we didn't write zlib */

0 commit comments

Comments
 (0)