new file mode 100644
@@ -0,0 +1,6 @@
+#ifndef COMPAT_ZLIB_H
+#define COMPAT_ZLIB_H
+
+#include <zlib.h>
+
+#endif /* COMPAT_ZLIB_H */
@@ -1537,7 +1537,7 @@ int cmd_main(int, const char **);
int common_exit(const char *file, int line, int code);
#define exit(code) exit(common_exit(__FILE__, __LINE__, (code)))
-#include <zlib.h>
+#include "compat/zlib-compat.h"
/*
* This include must come after system headers, since it introduces macros that
@@ -13,7 +13,7 @@ license that can be found in the LICENSE file or at
#include "record.h"
#include "reftable-error.h"
#include "system.h"
-#include <zlib.h>
+#include "compat/zlib-compat.h"
int header_size(int version)
{
Introduce a new "compat/zlib-compat.h" header that we include instead of including <zlib.h> directly. This will allow us to wire up zlib-ng as an alternative backend for zlib compression in a subsequent commit. Note that we cannot just call the file "compat/zlib.h", as that may otherwise cause us to include that file instead of <zlib.h>. Signed-off-by: Patrick Steinhardt <ps@pks.im> --- compat/zlib-compat.h | 6 ++++++ git-compat-util.h | 2 +- reftable/block.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-)